diff options
author | Kenneth Graunke <[email protected]> | 2013-05-20 23:46:16 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2013-05-23 09:37:12 -0700 |
commit | 3ddfccb303c571f83de7a0743021eda922c5c8a1 (patch) | |
tree | 47ea40b338cf8c2686748aedfcdebe994d5ff9ff /src/glsl/linker.cpp | |
parent | 4a0bcd90cff6701aaf08d9bbcf6144b18c2d8284 (diff) |
glsl linker: compare interface blocks during interstage linking
Verify that interface blocks match when linking separate shader
stages into a program.
Fixes piglit glsl-1.50 tests:
* linker/interface-blocks-vs-fs-member-count-mismatch.shader_test
* linker/interface-blocks-vs-fs-member-order-mismatch.shader_test
Signed-off-by: Kenneth Graunke <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 9a2243a4812..982fe46bd73 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1728,6 +1728,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) if (prog->_LinkedShaders[i] == NULL) continue; + if (!validate_interstage_interface_blocks(prog->_LinkedShaders[prev], + prog->_LinkedShaders[i])) { + linker_error(prog, "interface block mismatch between shader stages\n"); + goto done; + } + if (!cross_validate_outputs_to_inputs(prog, prog->_LinkedShaders[prev], prog->_LinkedShaders[i])) |