linker: Add comment about bug in initializer handling
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 14 Jul 2010 20:22:12 +0000 (13:22 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 19 Jul 2010 21:50:43 +0000 (14:50 -0700)
src/glsl/linker.cpp

index f7c178e967733b964b51818b393a929c44881516..06aa24e66f5b742aaf08226ea2022faf2fb30bf2 100644 (file)
@@ -314,6 +314,14 @@ cross_validate_globals(struct gl_shader_program *prog,
                   * have an initializer but a later instance does, copy the
                   * initializer to the version stored in the symbol table.
                   */
+                 /* FINISHME: This is wrong.  The constant_value field should
+                  * FINISHME: not be modified!  Imagine a case where a shader
+                  * FINISHME: without an initializer is linked in two different
+                  * FINISHME: programs with shaders that have differing
+                  * FINISHME: initializers.  Linking with the first will
+                  * FINISHME: modify the shader, and linking with the second
+                  * FINISHME: will fail.
+                  */
                  existing->constant_value = var->constant_value->clone(NULL);
            }
         } else