Cycles: Code cleanup, prepare for strict C++ flags
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 10:47:55 +0000 (15:47 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 13:23:31 +0000 (18:23 +0500)
29 files changed:
intern/cycles/blender/blender_camera.cpp
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/bvh/bvh_binning.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_opencl.cpp
intern/cycles/kernel/CMakeLists.txt
intern/cycles/render/background.cpp
intern/cycles/render/bake.cpp
intern/cycles/render/camera.cpp
intern/cycles/render/curves.cpp
intern/cycles/render/film.cpp
intern/cycles/render/image.cpp
intern/cycles/render/integrator.cpp
intern/cycles/render/light.cpp
intern/cycles/render/mesh.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/object.cpp
intern/cycles/render/osl.cpp
intern/cycles/render/particles.cpp
intern/cycles/render/shader.cpp
intern/cycles/render/svm.cpp
intern/cycles/render/tile.cpp
intern/cycles/util/util_task.cpp

index dee9ee09fc6dcdffada7823b26da1ba3e8a6066f..da10ede858d0fc7ddea26ccc93d98c72870ce112 100644 (file)
@@ -72,7 +72,7 @@ struct BlenderCamera {
        Transform matrix;
 };
 
-static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings b_render, BL::Scene b_scene)
+static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings b_render)
 {
        memset(bcam, 0, sizeof(BlenderCamera));
 
@@ -380,7 +380,7 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
 void BlenderSync::sync_camera(BL::RenderSettings b_render, BL::Object b_override, int width, int height)
 {
        BlenderCamera bcam;
-       blender_camera_init(&bcam, b_render, b_scene);
+       blender_camera_init(&bcam, b_render);
 
        /* pixel aspect */
        bcam.pixelaspect.x = b_render.pixel_aspect_x();
@@ -501,7 +501,7 @@ static void blender_camera_view_subset(BL::RenderSettings b_render, BL::Scene b_
 
        /* get viewport viewplane */
        BlenderCamera view_bcam;
-       blender_camera_init(&view_bcam, b_render, b_scene);
+       blender_camera_init(&view_bcam, b_render);
        blender_camera_from_view(&view_bcam, b_scene, b_v3d, b_rv3d, width, height, true);
 
        blender_camera_viewplane(&view_bcam, width, height,
@@ -509,7 +509,7 @@ static void blender_camera_view_subset(BL::RenderSettings b_render, BL::Scene b_
 
        /* get camera viewplane */
        BlenderCamera cam_bcam;
-       blender_camera_init(&cam_bcam, b_render, b_scene);
+       blender_camera_init(&cam_bcam, b_render);
        blender_camera_from_object(&cam_bcam, b_ob, true);
 
        blender_camera_viewplane(&cam_bcam, cam_bcam.full_width, cam_bcam.full_height,
@@ -601,14 +601,14 @@ static void blender_camera_border(BlenderCamera *bcam, BL::RenderSettings b_rend
 void BlenderSync::sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height)
 {
        BlenderCamera bcam;
-       blender_camera_init(&bcam, b_scene.render(), b_scene);
+       blender_camera_init(&bcam, b_scene.render());
        blender_camera_from_view(&bcam, b_scene, b_v3d, b_rv3d, width, height);
        blender_camera_border(&bcam, b_scene.render(), b_scene, b_v3d, b_rv3d, width, height);
 
        blender_camera_sync(scene->camera, &bcam, width, height);
 }
 
-BufferParams BlenderSync::get_buffer_params(BL::RenderSettings b_render, BL::Scene b_scene, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height)
+BufferParams BlenderSync::get_buffer_params(BL::RenderSettings b_render, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height)
 {
        BufferParams params;
        bool use_border = false;
index 72023d7e69b926f9872acc9bb4c6785d51498a2c..2ab4e68f967d04360b227aab7e89db678fb718e8 100644 (file)
@@ -44,8 +44,8 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData);
 void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
                                float3 RotCam, bool is_ortho);
 void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution);
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata);
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata);
+void ExportCurveTriangleUV(ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata);
+void ExportCurveTriangleVcol(ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata);
 
 ParticleCurveData::ParticleCurveData()
 {
@@ -322,7 +322,7 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
        return true;
 }
 
-static void set_resolution(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::Scene *scene, bool render)
+static void set_resolution(BL::Object *b_ob, BL::Scene *scene, bool render)
 {
        BL::Object::modifiers_iterator b_mod;
        for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
@@ -629,7 +629,7 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
        }
 }
 
-static void ExportCurveSegmentsMotion(Scene *scene, Mesh *mesh, ParticleCurveData *CData, int time_index)
+static void ExportCurveSegmentsMotion(Mesh *mesh, ParticleCurveData *CData, int time_index)
 {
        VLOG(1) << "Exporting curve motion segments for mesh " << mesh->name
                << ", time index " << time_index;
@@ -705,7 +705,7 @@ static void ExportCurveSegmentsMotion(Scene *scene, Mesh *mesh, ParticleCurveDat
        }
 }
 
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata)
+void ExportCurveTriangleUV(ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata)
 {
        if(uvdata == NULL)
                return;
@@ -750,7 +750,7 @@ void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset
        }
 }
 
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata)
+void ExportCurveTriangleVcol(ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata)
 {
        if(cdata == NULL)
                return;
@@ -886,7 +886,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        ParticleCurveData CData;
 
        if(!preview)
-               set_resolution(mesh, &b_mesh, &b_ob, &b_scene, true);
+               set_resolution(&b_ob, &b_scene, true);
 
        ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
 
@@ -917,7 +917,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        }
        else {
                if(motion)
-                       ExportCurveSegmentsMotion(scene, mesh, &CData, time_index);
+                       ExportCurveSegmentsMotion(mesh, &CData, time_index);
                else
                        ExportCurveSegments(scene, mesh, &CData);
        }
@@ -966,7 +966,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
 
                                uchar4 *cdata = attr_vcol->data_uchar4();
 
-                               ExportCurveTriangleVcol(mesh, &CData, tri_num * 3, used_res, cdata);
+                               ExportCurveTriangleVcol(&CData, tri_num * 3, used_res, cdata);
                        }
                        else {
                                Attribute *attr_vcol = mesh->curve_attributes.add(
@@ -1009,7 +1009,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
 
                                        float3 *uv = attr_uv->data_float3();
 
-                                       ExportCurveTriangleUV(mesh, &CData, tri_num * 3, used_res, uv);
+                                       ExportCurveTriangleUV(&CData, tri_num * 3, used_res, uv);
                                }
                                else {
                                        if(active_render)
@@ -1032,7 +1032,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        }
 
        if(!preview)
-               set_resolution(mesh, &b_mesh, &b_ob, &b_scene, false);
+               set_resolution(&b_ob, &b_scene, false);
 
        mesh->compute_bounds();
 }
index 292af14c63a71f6ad6705ae5d8c7ebd8144800cb..7e5893e566374695d05c0d5a00791944ccead458 100644 (file)
@@ -25,6 +25,7 @@
 #include "util_md5.h"
 #include "util_opengl.h"
 #include "util_path.h"
+#include "util_types.h"
 
 #ifdef WITH_OSL
 #include "osl.h"
@@ -70,7 +71,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
        return "";
 }
 
-static PyObject *init_func(PyObject *self, PyObject *args)
+static PyObject *init_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *path, *user_path;
        int headless;
@@ -90,7 +91,7 @@ static PyObject *init_func(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-static PyObject *create_func(PyObject *self, PyObject *args)
+static PyObject *create_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *pyengine, *pyuserpref, *pydata, *pyscene, *pyregion, *pyv3d, *pyrv3d;
        int preview_osl;
@@ -162,14 +163,14 @@ static PyObject *create_func(PyObject *self, PyObject *args)
        return PyLong_FromVoidPtr(session);
 }
 
-static PyObject *free_func(PyObject *self, PyObject *value)
+static PyObject *free_func(PyObject * /*self*/, PyObject *value)
 {
        delete (BlenderSession*)PyLong_AsVoidPtr(value);
 
        Py_RETURN_NONE;
 }
 
-static PyObject *render_func(PyObject *self, PyObject *value)
+static PyObject *render_func(PyObject * /*self*/, PyObject *value)
 {
        BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(value);
 
@@ -183,7 +184,7 @@ static PyObject *render_func(PyObject *self, PyObject *value)
 }
 
 /* pixel_array and result passed as pointers */
-static PyObject *bake_func(PyObject *self, PyObject *args)
+static PyObject *bake_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *pysession, *pyobject;
        PyObject *pypixel_array, *pyresult;
@@ -214,7 +215,7 @@ static PyObject *bake_func(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-static PyObject *draw_func(PyObject *self, PyObject *args)
+static PyObject *draw_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *pysession, *pyv3d, *pyrv3d;
 
@@ -234,7 +235,7 @@ static PyObject *draw_func(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-static PyObject *reset_func(PyObject *self, PyObject *args)
+static PyObject *reset_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *pysession, *pydata, *pyscene;
 
@@ -260,7 +261,7 @@ static PyObject *reset_func(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-static PyObject *sync_func(PyObject *self, PyObject *value)
+static PyObject *sync_func(PyObject * /*self*/, PyObject *value)
 {
        BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(value);
 
@@ -273,7 +274,7 @@ static PyObject *sync_func(PyObject *self, PyObject *value)
        Py_RETURN_NONE;
 }
 
-static PyObject *available_devices_func(PyObject *self, PyObject *args)
+static PyObject *available_devices_func(PyObject * /*self*/, PyObject * /*args*/)
 {
        vector<DeviceInfo>& devices = Device::available_devices();
        PyObject *ret = PyTuple_New(devices.size());
@@ -288,7 +289,7 @@ static PyObject *available_devices_func(PyObject *self, PyObject *args)
 
 #ifdef WITH_OSL
 
-static PyObject *osl_update_node_func(PyObject *self, PyObject *args)
+static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args)
 {
        PyObject *pynodegroup, *pynode;
        const char *filepath = NULL;
@@ -464,7 +465,7 @@ static PyObject *osl_update_node_func(PyObject *self, PyObject *args)
        Py_RETURN_TRUE;
 }
 
-static PyObject *osl_compile_func(PyObject *self, PyObject *args)
+static PyObject *osl_compile_func(PyObject * /*self*/, PyObject *args)
 {
        const char *inputfile = NULL, *outputfile = NULL;
 
@@ -479,7 +480,7 @@ static PyObject *osl_compile_func(PyObject *self, PyObject *args)
 }
 #endif
 
-static PyObject *system_info_func(PyObject *self, PyObject *value)
+static PyObject *system_info_func(PyObject * /*self*/, PyObject * /*value*/)
 {
        string system_info = Device::device_capabilities();
        return PyUnicode_FromString(system_info.c_str());
index e61203d807a62f5ee4f24e4890ff01c8bfa65843..4ff1d7713dc770533f06686646bf095bcd55bbc5 100644 (file)
@@ -133,7 +133,7 @@ void BlenderSession::create_session()
        }
 
        /* set buffer parameters */
-       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
        session->reset(buffer_params, session_params.samples);
 
        b_engine.use_highlight_tiles(session_params.progressive_refine == false);
@@ -186,7 +186,7 @@ void BlenderSession::reset_session(BL::BlendData b_data_, BL::Scene b_scene_)
        sync->sync_integrator();
        sync->sync_camera(b_render, b_engine.camera_override(), width, height);
 
-       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, PointerRNA_NULL, PointerRNA_NULL, scene->camera, width, height);
+       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, PointerRNA_NULL, PointerRNA_NULL, scene->camera, width, height);
        session->reset(buffer_params, session_params.samples);
 
        b_engine.use_highlight_tiles(session_params.progressive_refine == false);
@@ -411,7 +411,7 @@ void BlenderSession::render()
 
        /* get buffer parameters */
        SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
-       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
 
        /* render each layer */
        BL::RenderSettings r = b_scene.render();
@@ -511,7 +511,7 @@ static void populate_bake_data(BakeData *data, BL::BakePixel pixel_array, const
        }
 }
 
-void BlenderSession::bake(BL::Object b_object, const string& pass_type, BL::BakePixel pixel_array, const size_t num_pixels, const int depth, float result[])
+void BlenderSession::bake(BL::Object b_object, const string& pass_type, BL::BakePixel pixel_array, const size_t num_pixels, const int /*depth*/, float result[])
 {
        ShaderEvalType shader_type = get_shader_type(pass_type);
        size_t object_index = OBJECT_NONE;
@@ -543,7 +543,7 @@ void BlenderSession::bake(BL::Object b_object, const string& pass_type, BL::Bake
 
        /* get buffer parameters */
        SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
-       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
 
        scene->bake_manager->set_shader_limit((size_t)b_engine.tile_x(), (size_t)b_engine.tile_y());
        scene->bake_manager->set_baking(true);
@@ -692,7 +692,7 @@ void BlenderSession::synchronize()
 
        /* reset if needed */
        if(scene->need_reset()) {
-               BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+               BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
                session->reset(buffer_params, session_params.samples);
 
                /* reset time */
@@ -747,7 +747,7 @@ bool BlenderSession::draw(int w, int h)
                /* reset if requested */
                if(reset) {
                        SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
-                       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+                       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
                        bool session_pause = BlenderSync::get_session_pause(b_scene, background);
 
                        if(session_pause == false) {
@@ -764,7 +764,7 @@ bool BlenderSession::draw(int w, int h)
        update_status_progress();
 
        /* draw */
-       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+       BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
        DeviceDrawParams draw_params;
 
        if(session->params.display_buffer_linear) {
index 5628d96db2984707e92b775d8262184a3adebea8..32a4117e908679bdc72f6588d534e5c8781f07ea 100644 (file)
@@ -106,7 +106,7 @@ static ShaderSocketType convert_socket_type(BL::NodeSocket b_socket)
        }
 }
 
-static void set_default_value(ShaderInput *input, BL::Node b_node, BL::NodeSocket b_sock, BL::BlendData b_data, BL::ID b_id)
+static void set_default_value(ShaderInput *input, BL::NodeSocket b_sock, BL::BlendData b_data, BL::ID b_id)
 {
        /* copy values for non linked inputs */
        switch(input->type) {
@@ -514,7 +514,7 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
                                script_node->input_names.push_back(ustring(b_input->name()));
                                ShaderInput *input = script_node->add_input(script_node->input_names.back().c_str(),
                                                                            convert_socket_type(*b_input));
-                               set_default_value(input, b_node, *b_input, b_data, b_ntree);
+                               set_default_value(input, *b_input, b_data, b_ntree);
                        }
 
                        BL::Node::outputs_iterator b_output;
@@ -868,7 +868,7 @@ static void add_nodes(Scene *scene, BL::BlendData b_data, BL::Scene b_scene, Sha
 
                                input_map[b_input->ptr.data] = proxy->inputs[0];
 
-                               set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree);
+                               set_default_value(proxy->inputs[0], *b_input, b_data, b_ntree);
                        }
                        for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) {
                                ProxyNode *proxy = new ProxyNode(convert_socket_type(*b_output));
@@ -906,7 +906,7 @@ static void add_nodes(Scene *scene, BL::BlendData b_data, BL::Scene b_scene, Sha
 
                                                input_map[b_input->ptr.data] = proxy->inputs[0];
 
-                                               set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree);
+                                               set_default_value(proxy->inputs[0], *b_input, b_data, b_ntree);
                                        }
                                }
                        }
@@ -933,7 +933,7 @@ static void add_nodes(Scene *scene, BL::BlendData b_data, BL::Scene b_scene, Sha
                                        }
                                        input_map[b_input->ptr.data] = input;
 
-                                       set_default_value(input, *b_node, *b_input, b_data, b_ntree);
+                                       set_default_value(input, *b_input, b_data, b_ntree);
                                }
                                for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) {
                                        ShaderOutput *output = node_find_output_by_name(node, *b_node, *b_output);
index 6a320ac8085d0cbbb6e59366297bb8266bc5f93e..2c2e41fbca247558fe1439c287c3a49b92a956ac 100644 (file)
@@ -68,7 +68,7 @@ public:
                                                BL::Scene b_scene,
                                                bool background);
        static bool get_session_pause(BL::Scene b_scene, bool background);
-       static BufferParams get_buffer_params(BL::RenderSettings b_render, BL::Scene b_scene, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height);
+       static BufferParams get_buffer_params(BL::RenderSettings b_render, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height);
 
 private:
        /* sync */
index bd37ffbcf382754b624654994027c192e5004536..db96490a36f6553904c0b28e34db3d0f29c016d6 100644 (file)
@@ -29,10 +29,10 @@ CCL_NAMESPACE_BEGIN
 
 /* SSE replacements */
 
-__forceinline void prefetch_L1 (const void* ptr) { }
-__forceinline void prefetch_L2 (const void* ptr) { }
-__forceinline void prefetch_L3 (const void* ptr) { }
-__forceinline void prefetch_NTA(const void* ptr) { }
+__forceinline void prefetch_L1 (const void* /*ptr*/) { }
+__forceinline void prefetch_L2 (const void* /*ptr*/) { }
+__forceinline void prefetch_L3 (const void* /*ptr*/) { }
+__forceinline void prefetch_NTA(const void* /*ptr*/) { }
 
 template<size_t src> __forceinline float extract(const int4& b)
 { return b[src]; }
index 7c17f7f4112f2f633ba824576530cf80fafd317d..18fc707beab1a9ddb4c212563c0166675c96603e 100644 (file)
@@ -106,9 +106,15 @@ public:
        virtual void const_copy_to(const char *name, void *host, size_t size) = 0;
 
        /* texture memory */
-       virtual void tex_alloc(const char *name, device_memory& mem,
-               InterpolationType interpolation = INTERPOLATION_NONE, bool periodic = false) {};
-       virtual void tex_free(device_memory& mem) {};
+       virtual void tex_alloc(const char * /*name*/,
+                              device_memory& /*mem*/,
+                              InterpolationType interpolation = INTERPOLATION_NONE,
+                              bool periodic = false)
+       {
+               (void)interpolation;  /* Ignored. */
+               (void)periodic;  /* Ignored. */
+       };
+       virtual void tex_free(device_memory& /*mem*/) {};
 
        /* pixel memory */
        virtual void pixels_alloc(device_memory& mem);
@@ -119,7 +125,7 @@ public:
        virtual void *osl_memory() { return NULL; }
 
        /* load/compile kernels, must be called before adding tasks */ 
-       virtual bool load_kernels(bool experimental) { return true; }
+       virtual bool load_kernels(bool /*experimental*/) { return true; }
 
        /* tasks */
        virtual int get_split_task_count(DeviceTask& task) = 0;
@@ -138,8 +144,8 @@ public:
 #endif
 
        /* multi device */
-       virtual void map_tile(Device *sub_device, RenderTile& tile) {}
-       virtual int device_number(Device *sub_device) { return 0; }
+       virtual void map_tile(Device * /*sub_device*/, RenderTile& /*tile*/) {}
+       virtual int device_number(Device * /*sub_device*/) { return 0; }
 
        /* static */
        static Device *create(DeviceInfo& info, Stats &stats, bool background = true);
index 9abcf9167d5b687f66b57818626ac13ef07d194b..70277c5aa48316a45f8a0dd867fcbfe093b0aae9 100644 (file)
@@ -75,19 +75,21 @@ public:
                task_pool.stop();
        }
 
-       void mem_alloc(device_memory& mem, MemoryType type)
+       void mem_alloc(device_memory& mem, MemoryType /*type*/)
        {
                mem.device_pointer = mem.data_pointer;
                mem.device_size = mem.memory_size();
                stats.mem_alloc(mem.device_size);
        }
 
-       void mem_copy_to(device_memory& mem)
+       void mem_copy_to(device_memory& /*mem*/)
        {
                /* no-op */
        }
 
-       void mem_copy_from(device_memory& mem, int y, int w, int h, int elem)
+       void mem_copy_from(device_memory& /*mem*/,
+                          int /*y*/, int /*w*/, int /*h*/,
+                          int /*elem*/)
        {
                /* no-op */
        }
@@ -111,7 +113,7 @@ public:
                kernel_const_copy(&kernel_globals, name, host, size);
        }
 
-       void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
+       void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool /*periodic*/)
        {
                kernel_tex_copy(&kernel_globals, name, mem.data_pointer, mem.data_width, mem.data_height, mem.data_depth, interpolation);
                mem.device_pointer = mem.data_pointer;
index 79a1a2b7fe1de43cb0ac232c5802ba3a54951985..407f72034b3c8e99f4bb9ca952879fd753aba6b0 100644 (file)
@@ -185,7 +185,7 @@ public:
                cuda_assert(cuCtxDestroy(cuContext));
        }
 
-       bool support_device(bool experimental)
+       bool support_device(bool /*experimental*/)
        {
                int major, minor;
                cuDeviceComputeCapability(&major, &minor, cuDevId);
@@ -344,7 +344,7 @@ public:
                return (result == CUDA_SUCCESS);
        }
 
-       void mem_alloc(device_memory& mem, MemoryType type)
+       void mem_alloc(device_memory& mem, MemoryType /*type*/)
        {
                cuda_push_context();
                CUdeviceptr device_pointer;
@@ -999,7 +999,7 @@ public:
                }
        };
 
-       int get_split_task_count(DeviceTask& task)
+       int get_split_task_count(DeviceTask& /*task*/)
        {
                return 1;
        }
index a5bf35a63c8cea186b6c180ac60ae189c37ff927..f11c94245d52faab1d26f8a71fb25b1c9c2fdb41 100644 (file)
@@ -505,7 +505,7 @@ public:
        }
 
        static void CL_CALLBACK context_notify_callback(const char *err_info,
-               const void *private_info, size_t cb, void *user_data)
+               const void * /*private_info*/, size_t /*cb*/, void *user_data)
        {
                char name[256];
                clGetDeviceInfo((cl_device_id)user_data, CL_DEVICE_NAME, sizeof(name), &name, NULL);
@@ -596,7 +596,7 @@ public:
                return true;
        }
 
-       bool build_kernel(const string& kernel_path, const string *debug_src = NULL)
+       bool build_kernel(const string& /*kernel_path*/, const string *debug_src = NULL)
        {
                string build_options = opencl_kernel_build_options(platform_name, debug_src);
        
@@ -675,7 +675,7 @@ public:
                return md5.get_hex();
        }
 
-       bool load_kernels(bool experimental)
+       bool load_kernels(bool /*experimental*/)
        {
                /* verify if device was initialized */
                if(!device_initialized) {
@@ -854,7 +854,10 @@ public:
                mem_copy_to(*i->second);
        }
 
-       void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
+       void tex_alloc(const char *name,
+                      device_memory& mem,
+                      InterpolationType /*interpolation*/,
+                      bool /*periodic*/)
        {
                mem_alloc(mem, MEM_READ_ONLY);
                mem_copy_to(mem);
@@ -1092,7 +1095,7 @@ public:
                }
        };
 
-       int get_split_task_count(DeviceTask& task)
+       int get_split_task_count(DeviceTask& /*task*/)
        {
                return 1;
        }
index a25eb3f5b5034c362f45fb5ad8d5aba05a5a5c45..1e3eb6bca5489b1a15f6c38beedec4224c5c0d1b 100644 (file)
@@ -1,4 +1,3 @@
-
 set(INC
        .
        ../util
index f5e51f2e159fc5487c55a7a818e6fb369e465814..5fd7bd8f16f80f50fea6d38d60cd60b0ea582f6d 100644 (file)
@@ -93,7 +93,7 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene
        need_update = false;
 }
 
-void Background::device_free(Device *device, DeviceScene *dscene)
+void Background::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
 {
 }
 
index 1e8c1ac8bc96238b801c785e1b8677e2eb582459..c5201366bb21d574cdb8887de7d1189fba40a90f 100644 (file)
@@ -221,7 +221,10 @@ bool BakeManager::bake(Device *device, DeviceScene *dscene, Scene *scene, Progre
        return true;
 }
 
-void BakeManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
+void BakeManager::device_update(Device * /*device*/,
+                                DeviceScene * /*dscene*/,
+                                Scene * /*scene*/,
+                                Progress& progress)
 {
        if(!need_update)
                return;
@@ -231,7 +234,7 @@ void BakeManager::device_update(Device *device, DeviceScene *dscene, Scene *scen
        need_update = false;
 }
 
-void BakeManager::device_free(Device *device, DeviceScene *dscene)
+void BakeManager::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
 {
 }
 
index ea9b853d4549479ce0afb48bba7f295d5e95e372..74648a71fe0cabca01ef75a8611f4b30a8ebde0c 100644 (file)
@@ -284,7 +284,7 @@ void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
        previous_need_motion = need_motion;
 }
 
-void Camera::device_update_volume(Device *device,
+void Camera::device_update_volume(Device * /*device*/,
                                   DeviceScene *dscene,
                                   Scene *scene)
 {
@@ -306,7 +306,7 @@ void Camera::device_update_volume(Device *device,
        need_device_update = false;
 }
 
-void Camera::device_free(Device *device, DeviceScene *dscene)
+void Camera::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
 {
        /* nothing to free, only writing to constant memory */
 }
index 80dc6434cde4d16d640b2f9ce6bc6b019135f53d..f671eb19caed407604ee55a5c03e44b11c4ab04f 100644 (file)
@@ -103,7 +103,10 @@ CurveSystemManager::~CurveSystemManager()
 {
 }
 
-void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
+void CurveSystemManager::device_update(Device *device,
+                                       DeviceScene *dscene,
+                                       Scene * /*scene*/,
+                                       Progress& progress)
 {
        if(!need_update)
                return;
@@ -144,7 +147,8 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen
        need_update = false;
 }
 
-void CurveSystemManager::device_free(Device *device, DeviceScene *dscene)
+void CurveSystemManager::device_free(Device * /*device*/,
+                                     DeviceScene * /*dscene*/)
 {
 
 }
@@ -174,7 +178,7 @@ bool CurveSystemManager::modified_mesh(const CurveSystemManager& CurveSystemMana
                use_curves == CurveSystemManager.use_curves);
 }
 
-void CurveSystemManager::tag_update(Scene *scene)
+void CurveSystemManager::tag_update(Scene * /*scene*/)
 {
        need_update = true;
 }
index c6d12928dd4d5f752d34e74fbc1a71e299986c77..b23678dea4426496c18527f744e369c91e1bf009 100644 (file)
@@ -187,7 +187,7 @@ bool Pass::contains(const vector<Pass>& passes, PassType type)
 
 /* Pixel Filter */
 
-static float filter_func_box(float v, float width)
+static float filter_func_box(float /*v*/, float /*width*/)
 {
        return 1.0f;
 }
@@ -424,7 +424,9 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
        need_update = false;
 }
 
-void Film::device_free(Device *device, DeviceScene *dscene, Scene *scene)
+void Film::device_free(Device * /*device*/,
+                       DeviceScene * /*dscene*/,
+                       Scene *scene)
 {
        if(filter_table_offset != TABLE_OFFSET_INVALID) {
                scene->lookup_tables->remove_table(filter_table_offset);
@@ -459,7 +461,7 @@ void Film::tag_passes_update(Scene *scene, const vector<Pass>& passes_)
        passes = passes_;
 }
 
-void Film::tag_update(Scene *scene)
+void Film::tag_update(Scene * /*scene*/)
 {
        need_update = true;
 }
index 61a0a81d51dc6bb06ef3e76b0daf2fdd34b2097a..6e63b433709be6edd4361d8a8f3e8f6c901c92b1 100644 (file)
@@ -791,7 +791,9 @@ void ImageManager::device_update(Device *device, DeviceScene *dscene, Progress&
        need_update = false;
 }
 
-void ImageManager::device_pack_images(Device *device, DeviceScene *dscene, Progress& progess)
+void ImageManager::device_pack_images(Device *device,
+                                      DeviceScene *dscene,
+                                      Progress& /*progess*/)
 {
        /* for OpenCL, we pack all image textures inside a single big texture, and
         * will do our own interpolation in the kernel */
index 17c50ca826f0afac833cc1d8f9a409267be3bc16..465d7ea02c69e5554fb1f0cde9afffc4be558d3a 100644 (file)
@@ -216,7 +216,7 @@ bool Integrator::modified(const Integrator& integrator)
                sample_all_lights_indirect == integrator.sample_all_lights_indirect);
 }
 
-void Integrator::tag_update(Scene *scene)
+void Integrator::tag_update(Scene * /*scene*/)
 {
        need_update = true;
 }
index b6c7b379a7e242c8521bea135fa1073f95be3a07..08ee8eddc076c00b8e9ea8f1de50ee3c1a2b2510 100644 (file)
@@ -699,7 +699,7 @@ void LightManager::device_free(Device *device, DeviceScene *dscene)
        dscene->light_background_conditional_cdf.clear();
 }
 
-void LightManager::tag_update(Scene *scene)
+void LightManager::tag_update(Scene * /*scene*/)
 {
        need_update = true;
 }
index 9c7310d4a05ba74906ab592fc0313f1c4e82bfa1..4ec5312e9a356baf16f66ce2afd297d752319bae 100644 (file)
@@ -1124,7 +1124,10 @@ void MeshManager::device_update_bvh(Device *device, DeviceScene *dscene, Scene *
        dscene->data.bvh.use_qbvh = scene->params.use_qbvh;
 }
 
-void MeshManager::device_update_flags(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
+void MeshManager::device_update_flags(Device * /*device*/,
+                                      DeviceScene * /*dscene*/,
+                                      Scene * scene,
+                                      Progress& /*progress*/)
 {
        if(!need_update && !need_flags_update) {
                return;
index 7a39811cacd24b900ae62030d798ea243e508122..b41f4b511b343c71628f029a9c7a3ebbf0be4184 100644 (file)
@@ -1507,11 +1507,11 @@ ProxyNode::ProxyNode(ShaderSocketType type_)
        add_output("Output", type);
 }
 
-void ProxyNode::compile(SVMCompiler& compiler)
+void ProxyNode::compile(SVMCompiler& /*compiler*/)
 {
 }
 
-void ProxyNode::compile(OSLCompiler& compiler)
+void ProxyNode::compile(OSLCompiler& /*compiler*/)
 {
 }
 
@@ -1587,7 +1587,7 @@ void BsdfNode::compile(SVMCompiler& compiler)
        compile(compiler, NULL, NULL);
 }
 
-void BsdfNode::compile(OSLCompiler& compiler)
+void BsdfNode::compile(OSLCompiler& /*compiler*/)
 {
        assert(0);
 }
@@ -2078,7 +2078,7 @@ void VolumeNode::compile(SVMCompiler& compiler)
        compile(compiler, NULL, NULL);
 }
 
-void VolumeNode::compile(OSLCompiler& compiler)
+void VolumeNode::compile(OSLCompiler& /*compiler*/)
 {
        assert(0);
 }
@@ -2916,7 +2916,7 @@ AddClosureNode::AddClosureNode()
        add_output("Closure",  SHADER_SOCKET_CLOSURE);
 }
 
-void AddClosureNode::compile(SVMCompiler& compiler)
+void AddClosureNode::compile(SVMCompiler& /*compiler*/)
 {
        /* handled in the SVM compiler */
 }
@@ -2939,7 +2939,7 @@ MixClosureNode::MixClosureNode()
        add_output("Closure",  SHADER_SOCKET_CLOSURE);
 }
 
-void MixClosureNode::compile(SVMCompiler& compiler)
+void MixClosureNode::compile(SVMCompiler& /*compiler*/)
 {
        /* handled in the SVM compiler */
 }
@@ -2977,7 +2977,7 @@ void MixClosureWeightNode::compile(SVMCompiler& compiler)
                        weight1_out->stack_offset, weight2_out->stack_offset));
 }
 
-void MixClosureWeightNode::compile(OSLCompiler& compiler)
+void MixClosureWeightNode::compile(OSLCompiler& /*compiler*/)
 {
        assert(0);
 }
@@ -4122,7 +4122,7 @@ OSLScriptNode::OSLScriptNode()
        special_type = SHADER_SPECIAL_TYPE_SCRIPT;
 }
 
-void OSLScriptNode::compile(SVMCompiler& compiler)
+void OSLScriptNode::compile(SVMCompiler& /*compiler*/)
 {
        /* doesn't work for SVM, obviously ... */
 }
index 1225125b57e97da17d822d3add1cb5e0302f4361..840f706f23bece3474eaf0f15988e326a7438e1a 100644 (file)
@@ -402,8 +402,10 @@ void ObjectManager::device_update(Device *device, DeviceScene *dscene, Scene *sc
        }
 }
 
-void ObjectManager::device_update_flags(Device *device, DeviceScene *dscene,
-                                        Scene *scene, Progress& progress)
+void ObjectManager::device_update_flags(Device *device,
+                                        DeviceScene *dscene,
+                                        Scene *scene,
+                                        Progress& /*progress*/)
 {
        if(!need_update && !need_flags_update)
                return;
index 9d6f412d9ce2abd2590b51e5fa90dbff1551fb9b..a0f6c368a9c47a68144a3d1310842e3e4024ac52 100644 (file)
@@ -67,7 +67,7 @@ OSLShaderManager::~OSLShaderManager()
        texture_system_free();
 }
 
-void OSLShaderManager::reset(Scene *scene)
+void OSLShaderManager::reset(Scene * /*scene*/)
 {
        shading_system_free();
        shading_system_init();
index f2f154cdab4fc80daa96e05725e2f22369f1e4aa..f6a89d7a10c4a07d040621d9186f1f26931f5086 100644 (file)
@@ -111,7 +111,7 @@ void ParticleSystemManager::device_free(Device *device, DeviceScene *dscene)
        dscene->particles.clear();
 }
 
-void ParticleSystemManager::tag_update(Scene *scene)
+void ParticleSystemManager::tag_update(Scene * /*scene*/)
 {
        need_update = true;
 }
index 5899c562f728215d7ed27982f6cd68f9b1bd45f9..81a7b7878859405094a79d5ab6446368546698d1 100644 (file)
@@ -321,7 +321,10 @@ void ShaderManager::device_update_shaders_used(Scene *scene)
                scene->shaders[light->shader]->used = true;
 }
 
-void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
+void ShaderManager::device_update_common(Device *device,
+                                         DeviceScene *dscene,
+                                         Scene *scene,
+                                         Progress& /*progress*/)
 {
        device->tex_free(dscene->shader_flag);
        dscene->shader_flag.clear();
index 2e3abfcffb97389c33364033b2cd5e1db752f7a9..f5264debd8b43ff9c8ddde8e259686978e7cc9d8 100644 (file)
@@ -39,7 +39,7 @@ SVMShaderManager::~SVMShaderManager()
 {
 }
 
-void SVMShaderManager::reset(Scene *scene)
+void SVMShaderManager::reset(Scene * /*scene*/)
 {
 }
 
@@ -354,7 +354,7 @@ uint SVMCompiler::attribute(AttributeStandard std)
        return shader_manager->get_attribute_id(std);
 }
 
-bool SVMCompiler::node_skip_input(ShaderNode *node, ShaderInput *input)
+bool SVMCompiler::node_skip_input(ShaderNode * /*node*/, ShaderInput *input)
 {
        /* nasty exception .. */
        if(current_type == SHADER_TYPE_DISPLACEMENT && input->link && input->link->parent->name == ustring("bump"))
index 675f49ec3001b3055f07c35bd2f0d0181000d45f..b1cad98a852832c8ed9b80637961ba6b02843138 100644 (file)
@@ -28,6 +28,7 @@ TileManager::TileManager(bool progressive_, int num_samples_, int2 tile_size_, i
        tile_size = tile_size_;
        tile_order = tile_order_;
        start_resolution = start_resolution_;
+       num_samples = num_samples_;
        num_devices = num_devices_;
        preserve_tile_device = preserve_tile_device_;
        background = background_;
index e43b26ddfe28274bfe7f1f3c9af54eb60a63e8e9..d56553d1d4a5fc9632533ae61f95f7360de011a5 100644 (file)
@@ -237,7 +237,7 @@ bool TaskScheduler::thread_wait_pop(Entry& entry)
        return true;
 }
 
-void TaskScheduler::thread_run(int thread_id)
+void TaskScheduler::thread_run(int /*thread_id*/)
 {
        Entry entry;