diff options
author | Glenn Kennard <glenn.kennard@gmail.com> | 2017-03-07 00:11:18 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-03-20 17:14:59 +1000 |
commit | 4ad26d88facbb90590fa087970cb4e8588a6912d (patch) | |
tree | 7deb77100e037a6159e1d013ecb9e3b95ac8d851 /tests/spec/glsl-1.30 | |
parent | 292d35a29e0e3b860153c9fda695008018871399 (diff) |
glsl-1.30: Test multiple large local arrays
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Diffstat (limited to 'tests/spec/glsl-1.30')
-rw-r--r-- | tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test b/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test new file mode 100644 index 000000000..1ad6a464c --- /dev/null +++ b/tests/spec/glsl-1.30/execution/fs-multiple-large-local-arrays.shader_test @@ -0,0 +1,35 @@ +# Both arrays will typically not fit into the GPU's +# fastest storage type, requiring at least one to +# be spilled/reloaded from a slower memory. +# Test that this still produces correct values for array +# elements. +[require] +GLSL >= 1.30 + +[vertex shader passthrough] + +[fragment shader] +uniform uint i; +void main() +{ + uint A[60]; + uint B[70]; + A[20] = 0u; + A[i] = 37u; + B[20] = 0u; + B[i] = 39u; + gl_FragColor.rba = vec3(0.0, 0.0, 1.0); + gl_FragColor.g = float(A[20] == 37u && B[20] == 39u); +} + +[test] +clear color 1.0 0.0 0.0 1.0 +clear +uniform uint i 19 +draw rect -1 -1 2 2 +probe all rgba 0.0 0.0 0.0 1.0 + +clear +uniform uint i 20 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 |