aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2013-05-20 23:42:49 -0700
committerJordan Justen <[email protected]>2013-05-23 09:37:12 -0700
commit4a0bcd90cff6701aaf08d9bbcf6144b18c2d8284 (patch)
tree99c738535c1bbdfea537cba3c1abbb6e5ec45a65 /src/glsl/linker.cpp
parentd6863acb9f40fd36eb18e873def31a3b72e0d68a (diff)
glsl linker: compare interface blocks during intrastage linking
Verify that interface blocks match when combining compilation units at the same stage. (For example, when merging all vertex shaders.) Fixes piglit glsl-1.50 test: * linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test v5 (Ken): Rename to link_interface_blocks.cpp and drop the separate .h file for consistency with other linker code. Remove "ok" variable. Fold cross_validate_interface_blocks into its caller. Signed-off-by: Jordan Justen <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index c8d430caf57..9a2243a4812 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -938,6 +938,12 @@ link_intrastage_shaders(void *mem_ctx,
if (!cross_validate_globals(prog, shader_list, num_shaders, false))
return NULL;
+ /* Check that interface blocks defined in multiple shaders are consistent.
+ */
+ if (!validate_intrastage_interface_blocks((const gl_shader **)shader_list,
+ num_shaders))
+ return NULL;
+
/* Check that uniform blocks between shaders for a stage agree. */
const int num_uniform_blocks =
link_uniform_blocks(mem_ctx, prog, shader_list, num_shaders,