From a645df01340d758b79905696a7ae41e196ba57f5 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 15 Nov 2013 14:23:45 -0800 Subject: glsl: Fix interstage uniform interface block link error detection. Previously, we checked for interstage uniform interface block link errors in validate_interstage_interface_blocks(), which is only called on pairs of adjacent shader stages. Therefore, we failed to detect uniform interface block mismatches between non-adjacent shader stages. Before the introduction of geometry shaders, this wasn't a problem, because the only supported shader stages were vertex and fragment shaders, therefore they were always adjacent. However, now that we allow a program to contain vertex, geometry, and fragment shaders, that is no longer the case. Fixes piglit test "skip-stage-uniform-block-array-size-mismatch". Cc: "10.0" v2: Rename validate_interstage_interface_blocks() to validate_interstage_inout_blocks() to reflect the fact that it no longer validates uniform blocks. Reviewed-by: Jordan Justen v3: Make validate_interstage_inout_blocks() skip uniform blocks. Reviewed-by: Ian Romanick (cherry picked from commit 544e3129c5addeb6c9539339782dd54616ef0499) --- src/glsl/linker.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/glsl/linker.h') diff --git a/src/glsl/linker.h b/src/glsl/linker.h index 7b1f6f9c5eb..130915db412 100644 --- a/src/glsl/linker.h +++ b/src/glsl/linker.h @@ -65,9 +65,13 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog, unsigned num_shaders); void -validate_interstage_interface_blocks(struct gl_shader_program *prog, - const gl_shader *producer, - const gl_shader *consumer); +validate_interstage_inout_blocks(struct gl_shader_program *prog, + const gl_shader *producer, + const gl_shader *consumer); + +void +validate_interstage_uniform_blocks(struct gl_shader_program *prog, + gl_shader **stages, int num_stages); extern void link_assign_atomic_counter_resources(struct gl_context *ctx, -- cgit v1.2.3