Modified the unsized_array_member.shader_test to expect successful
linking instead of linker error.

According to the GLSLang Specification (version 4.60 Section 4.2 Scoping):

"An array implicitly sized in one shader can be explicitly sized by
another shader in the same stage. If no shader in a stage has an explicit
size for the array, the largest implicit size (one more than the largest
index used) in that stage is used. There is no cross-stage array sizing.
If there is no static access to an implicitly sized array within the stage
declaring it, then the array is given a size of 1, which is relevant when
the array is declared within an interface block that is shared with other
stages or the application (other unused arrays might be eliminated by the
optimizer)."

This means that the unused array s of the following shader block in the
unsized_array_member.shader_test:
buffer a {
        vec4 s[];
        vec4 a[];
} b;
should be an array of size 1 and not an unsized array, and so no linker
error should be generated.

Ref: https://bugs.freedesktop.org/show_bug.cgi?id=106915
---
 .../linker/unsized_array_member.shader_test                     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/unsized_array_member.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/unsized_array_member.shader_test
index 47d0483ac..4c628763e 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/unsized_array_member.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/unsized_array_member.shader_test
@@ -31,4 +31,4 @@ void main(void) {
 }
 
 [test]
-link error
+link success
-- 
2.17.0

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to