On 25/01/18 00:11, Fabian Bieler wrote: > On 2018-01-24 15:20, Alejandro Piñeiro wrote: >> Although seems somewhat too specific, with mesa HEAD at: >> 766589d89a211e67f313e8cb38f2d05b09975f96 >> >> this test crashes, so it would be good to include a test for this. >> --- >> .../ubo/fs-const-explicit-binding.shader_test | 42 >> ++++++++++++++++++++++ >> 1 file changed, 42 insertions(+) >> create mode 100644 >> tests/spec/arb_arrays_of_arrays/execution/ubo/fs-const-explicit-binding.shader_test >> >> diff --git >> a/tests/spec/arb_arrays_of_arrays/execution/ubo/fs-const-explicit-binding.shader_test >> >> b/tests/spec/arb_arrays_of_arrays/execution/ubo/fs-const-explicit-binding.shader_test >> new file mode 100644 >> index 0000000000..8a1d615085 >> --- /dev/null >> +++ >> b/tests/spec/arb_arrays_of_arrays/execution/ubo/fs-const-explicit-binding.shader_test >> @@ -0,0 +1,42 @@ >> +# This test verifies that array of arrays UBO works when using an >> +# explicit binding. >> + >> +[require] >> +GLSL >= 1.50 >> +GL_ARB_arrays_of_arrays >> +GL_ARB_shading_language_420pack >> + >> +[vertex shader passthrough] >> + >> +[fragment shader] >> +#version 150 >> +#extension GL_ARB_arrays_of_arrays: require >> +#extension GL_ARB_shading_language_420pack: require >> + >> +layout (binding = 5) uniform block { >> + vec4 color[2]; >> +} arr[4][2]; >> + >> +uniform int n; >> + >> +out vec4 color; >> + >> +void main() >> +{ >> + color = arr[3][0].color[1] + arr[1][1].color[0];> +} >> + >> +[test] >> +clear color 0.2 0.2 0.2 0.2 >> +clear >> + >> +ubo array index 3 > Maybe add a comment like #[1][1]
Ok. >> +uniform vec4 block.color[0] 0.0 1.0 0.0 0.0 >> +uniform vec4 block.color[1] 1.0 0.0 0.0 0.0 >> + >> +ubo array index 6 > and #[3][0] to these two lines for slow-pokes like me. 😉 Ok. > > Either way: > Reviewed-by: Fabian Bieler <fabianbie...@fastmail.fm> Thanks for the review. I have just pushed it with your suggestions. FWIW: as mentioned on the commit message, right now this test fails. But I already sent a patch to mesa-dev: https://patchwork.freedesktop.org/patch/200392/ BR _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit