Commit: da9d75afc83c6e8519cf484c4d63713dae37ee9c
Author: Nicholas Bishop
Date:   Sat Feb 7 21:39:34 2015 +0100
Branches: cycles-ptex-49
https://developer.blender.org/rBda9d75afc83c6e8519cf484c4d63713dae37ee9c

Minor code cleanups for Ptex

===================================================================

M       extern/ptex/BPX_pack.h
M       intern/cycles/render/nodes.cpp
M       intern/cycles/util/util_types.h
M       source/blender/gpu/intern/gpu_codegen.c
M       source/blender/gpu/intern/gpu_material.c

===================================================================

diff --git a/extern/ptex/BPX_pack.h b/extern/ptex/BPX_pack.h
index f563a8e..11a0af2 100644
--- a/extern/ptex/BPX_pack.h
+++ b/extern/ptex/BPX_pack.h
@@ -7,8 +7,6 @@ extern "C"{
 
 /* BPX is short for Blender Ptex */
 
-/* TODO(nicholasbishop): merge some bits of bl_pack.h */
-
 /* TODO(nicholasbishop): more comments and organization */
 
 typedef struct BPXImageBuf BPXImageBuf;
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 4e9678e..b74cb87 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -255,14 +255,6 @@ void ImageTextureNode::compile(SVMCompiler& compiler)
                                                  NODE_ATTR_FLOAT3);
        }
 
-       if (ptex) {
-               // TODO
-               // int attr = compiler.attribute(ATTR_STD_PTEX_LAYER);
-               // compiler.stack_assign(out);
-               // compiler.add_node(attr_node, attr, out->stack_offset, 
NODE_ATTR_FLOAT3);
-               // slot = 
-       }
-
        image_manager = compiler.image_manager;
        if(is_float == -1) {
                bool is_float_bool;
@@ -451,16 +443,8 @@ void PtexTextureNode::compile(SVMCompiler& compiler)
        ShaderInput *vector_in = input("Vector");
        ShaderOutput *color_out = output("Color");
        ShaderOutput *alpha_out = output("Alpha");
-       int layer_attr_id = -1;
-       
 
-       {
-               // TODO
-               layer_attr_id = compiler.attribute(ptex_layer);
-               //compiler.stack_assign(layer_in);
-               // compiler.add_node(NODE_ATTR, attr, layer_in->stack_offset,
-               //                                NODE_ATTR_FLOAT);
-       }
+       const int layer_attr_id = compiler.attribute(ptex_layer);
 
        {
                int attr = compiler.attribute(ATTR_STD_PTEX_UV);
@@ -471,21 +455,12 @@ void PtexTextureNode::compile(SVMCompiler& compiler)
 
        image_manager = compiler.image_manager;
 
-       
-
-       // if(slot != -1 && is_float == -1) {
-       //      bool is_float_bool;
-       //      slot = image_manager->add_image(filename, builtin_data,
-       //                                      animated, 0, is_float_bool, 
is_linear,
-       //                                      interpolation, use_alpha);
-       //      is_float = (int)is_float_bool;
-       // }
-
        if(!color_out->links.empty())
                compiler.stack_assign(color_out);
        if(!alpha_out->links.empty())
                compiler.stack_assign(alpha_out);
 
+       // TODO
        if (true)
        {
                //if(slot != -1) {
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index 0951684..3ec8fd2 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -460,11 +460,7 @@ ccl_device_inline int4 make_int4(const float3& f)
 
 #endif
 
-// TODO
 typedef uint (*PtexRegions)[4];
-struct PtexRegion {
-       int x, y, width, height;
-};
 
 /* Interpolation types for textures
  * cuda also use texture space to store other objects */
diff --git a/source/blender/gpu/intern/gpu_codegen.c 
b/source/blender/gpu/intern/gpu_codegen.c
index 553980d..8083788c 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -819,9 +819,7 @@ static void gpu_nodes_extract_dynamic_inputs(GPUPass *pass, 
ListBase *nodes)
        GPU_shader_unbind();
 }
 
-void GPU_pass_bind(GPUPass *pass, double time, int mipmap,
-                                  // TODO
-                                  Object *ob)
+void GPU_pass_bind(GPUPass *pass, double time, int mipmap, Object *ob)
 {
        GPUInput *input;
        GPUShader *shader = pass->shader;
diff --git a/source/blender/gpu/intern/gpu_material.c 
b/source/blender/gpu/intern/gpu_material.c
index 6995052..5de5dfe 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -280,7 +280,7 @@ bool GPU_lamp_override_visible(GPULamp *lamp, 
SceneRenderLayer *srl, Material *m
                return true;
 }
 
-void GPU_material_bind(GPUMaterial *material, int oblay, int viewlay, double 
time, int mipmap, float viewmat[4][4], float viewinv[4][4], float 
camerafactors[4], bool scenelock, // TODO
+void GPU_material_bind(GPUMaterial *material, int oblay, int viewlay, double 
time, int mipmap, float viewmat[4][4], float viewinv[4][4], float 
camerafactors[4], bool scenelock,
                                           Object *ob)
 {
        if (material->pass) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to