summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2016-05-17 13:49:11 -0700
committerIan Romanick <ian.d.romanick@intel.com>2016-05-18 10:53:50 -0700
commit7619aed41d6b677a05c1088aed3a6b6a70255496 (patch)
tree84b926f97b372a9fb236926f305aba1c203e7cd5 /src/compiler
parent79bbff9defd98167bf14336a44985088e2fd3f37 (diff)
glsl/linker: Ensure the first stage of an SSO pipeline has input locs assigned
Previously an SSO pipeline containing only a tessellation control shader and a tessellation evaluation shader would not get locations assigned for the TCS inputs. This would lead to assertion failures in some piglit tests, such as arb_program_interface_query-resource-query. That piglit test still fails on some tessellation related subtests. Specifically, these subtests fail: 'GL_PROGRAM_INPUT(tcs) active resources' expected 2 but got 3 'GL_PROGRAM_INPUT(tcs) max length name' expected 12 but got 16 'GL_PROGRAM_INPUT(tcs,tes) active resources' expected 2 but got 3 'GL_PROGRAM_INPUT(tcs,tes) max length name' expected 12 but got 16 'GL_PROGRAM_OUTPUT(tcs) active resources' expected 15 but got 3 'GL_PROGRAM_OUTPUT(tcs) max length name' expected 23 but got 12 Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: mesa-stable@lists.freedesktop.org
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/linker.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 6246944b0b4..de569453ee4 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4790,7 +4790,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
*/
int next = last;
for (int i = next - 1; i >= 0; i--) {
- if (prog->_LinkedShaders[i] == NULL)
+ if (prog->_LinkedShaders[i] == NULL && i != 0)
continue;
gl_shader *const sh_i = prog->_LinkedShaders[i];
@@ -4806,8 +4806,11 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
tfeedback_decls);
/* This must be done after all dead varyings are eliminated. */
- if (!check_against_output_limit(ctx, prog, sh_i))
- goto done;
+ if (sh_i != NULL) {
+ if (!check_against_output_limit(ctx, prog, sh_i)) {
+ goto done;
+ }
+ }
if (!check_against_input_limit(ctx, prog, sh_next))
goto done;