[Piglit] [PATCH 06/11] arb_compute_shader: Test basic uniform access in a compute shader

Jordan Justen jordan.l.justen at intel.com
Sun Jun 1 17:39:11 PDT 2014


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 .../execution/basic-uniform-access.shader_test     | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test

diff --git a/tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test b/tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test
new file mode 100644
index 0000000..26b9220
--- /dev/null
+++ b/tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test
@@ -0,0 +1,37 @@
+# Verify simple reading of a uniform and output to an image
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_compute_shader
+GL_ARB_shader_image_load_store
+
+[compute shader]
+#version 330
+#extension GL_ARB_compute_shader: enable
+#extension GL_ARB_shader_image_load_store: enable
+
+uniform vec4 color;
+writeonly uniform image2D tex;
+
+layout(local_size_x = 16, local_size_y = 16) in;
+
+void main()
+{
+	ivec2 coord = ivec2(gl_GlobalInvocationID.xy);
+	imageStore(tex, coord, color);
+}
+
+[test]
+uniform int tex 0
+texture rgbw 0 (16, 16)
+image texture 0
+fb tex 2d 0
+
+uniform vec4 color 1.0 0.0 0.0 0.0
+compute 1 1 1
+probe all rgba 1.0 0.0 0.0 0.0
+
+uniform vec4 color 0.0 1.0 0.0 0.0
+compute 1 1 1
+probe all rgba 0.0 1.0 0.0 0.0
-- 
2.0.0.rc4



More information about the Piglit mailing list