summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-07-14 13:22:12 -0700
committerIan Romanick <[email protected]>2010-07-19 14:50:43 -0700
commitde415b7f4b1278f10097f4af80886bc82912dd92 (patch)
treeef04fef82c4113e27379d5f45b83acb40d9c992a /src
parent8fe8a814b0c746f0f655a67f8755f9dee858d230 (diff)
linker: Add comment about bug in initializer handling
Diffstat (limited to 'src')
-rw-r--r--src/glsl/linker.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index f7c178e9677..06aa24e66f5 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -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