diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-06-08 11:25:47 +1000 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-07-29 11:33:57 +1000 |
commit | 3e80149223e22e4d59be0e9c037d1b1aacec87dc (patch) | |
tree | 6a8c3f884470f6536ce8abbef5f22bce8c200ee8 | |
parent | baee8e91df534042ab5f6a7dfa6d09679625177b (diff) |
arb_arrays_of_arrays: basic image store execution tests
Test results:
Nvidia GeForce 840M - NVIDIA 346.47
basic-imageStore-const-uniform-index.shader_test - pass
basic-imageStore-non-const-uniform-index.shader_test - pass
2 files changed, 159 insertions, 0 deletions
diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test new file mode 100644 index 000000000..0009f86b6 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test @@ -0,0 +1,58 @@ +# Verify simple reading of a uniform and output to an image + +[require] +GL >= 3.3 +GLSL >= 3.30 +GL_ARB_shader_image_load_store +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 130 +in vec4 piglit_vertex; + +void main() +{ + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 330 +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: require + +uniform vec4 color; +writeonly uniform image2D tex[2][2]; +out vec4 outcolor; + +void main() +{ + imageStore(tex[1][0], ivec2(gl_FragCoord.xy), color); + outcolor = vec4(0.0, 0.0, 0.0, 1.0); +} + +[test] +# Texture 0 is the imageStore output. +uniform int tex[1][0] 0 +texture rgbw 0 (16, 16) +image texture 0 + +# Texture 1 is the rendering output. We don't care about this. +texture rgbw 1 (16, 16) + +# Store red using imageStore +uniform vec4 color 1.0 0.0 0.0 1.0 +fb tex 2d 1 +draw rect -1 -1 2 2 + +# Test the result of imageStore +fb tex 2d 0 +probe all rgba 1.0 0.0 0.0 1.0 + +# Store green using imageStore +uniform vec4 color 0.0 1.0 0.0 1.0 +fb tex 2d 1 +draw rect -1 -1 2 2 + +# Test the result of imageStore +fb tex 2d 0 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test new file mode 100644 index 000000000..f5271e67c --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test @@ -0,0 +1,101 @@ +# Verify simple reading of a uniform and output to an image + +[require] +GL >= 3.3 +GLSL >= 3.30 +GL_ARB_shader_image_load_store +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 130 +in vec4 piglit_vertex; + +void main() +{ + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 330 +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: require + +uniform vec4 color; +uniform int n; +uniform int m; +writeonly uniform image2D tex[2][2]; +out vec4 outcolor; + +void main() +{ + imageStore(tex[n][m], ivec2(gl_FragCoord.xy), color); + outcolor = vec4(0.0, 0.0, 0.0, 1.0); +} + +[test] +# Texture 0 is the imageStore output. +uniform int tex[0][0] 0 +texture rgbw 0 (16, 16) +image texture 0 + +# Texture 1 is the imageStore output. +uniform int tex[0][1] 1 +texture rgbw 1 (16, 16) +image texture 1 + +# Texture 2 is the imageStore output. +uniform int tex[1][0] 2 +texture rgbw 2 (16, 16) +image texture 2 + +# Texture 3 is the imageStore output. +uniform int tex[1][1] 3 +texture rgbw 3 (16, 16) +image texture 3 + +# Texture 4 is the rendering output. We don't care about this. +texture rgbw 4 (16, 16) + +# Store red using imageStore +uniform int n 0 +uniform int m 0 +uniform vec4 color 1.0 0.0 0.0 1.0 +fb tex 2d 4 +draw rect -1 -1 2 2 + +# Test the result of imageStore 0 +fb tex 2d 0 +probe all rgba 1.0 0.0 0.0 1.0 + +# Store green using imageStore +uniform int n 0 +uniform int m 1 +uniform vec4 color 0.0 1.0 0.0 1.0 +fb tex 2d 4 +draw rect -1 -1 2 2 + +# Test the result of imageStore 1 +fb tex 2d 1 +probe all rgba 0.0 1.0 0.0 1.0 + +# Store blue using imageStore +uniform int n 1 +uniform int m 0 +uniform vec4 color 0.0 0.0 1.0 1.0 +fb tex 2d 4 +draw rect -1 -1 2 2 + +# Test the result of imageStore 2 +fb tex 2d 2 +probe all rgba 0.0 0.0 1.0 1.0 + +# Store cyan using imageStore +uniform int n 1 +uniform int m 1 +uniform vec4 color 0.0 1.0 1.0 1.0 +fb tex 2d 4 +draw rect -1 -1 2 2 + +# Test the result of imageStore 3 +fb tex 2d 3 +probe all rgba 0.0 1.0 1.0 1.0 |