[Piglit] [PATCH v2 3/4] arb_compute_shader: Use GL_RGBA8 for image_load_store internal format

Jordan Justen jordan.l.justen at intel.com
Fri Jun 12 15:23:12 PDT 2015


The motivation for this is that (as noted by curro)
ARB_shader_image_load_store doesn't support images with an internal
format of GL_RGBA.

See 'Table X.2' in
https://www.opengl.org/registry/specs/ARB/shader_image_load_store.txt

Therefore, in order to use image load/store in shader runner tests, we
must override the default internal format when creating the image.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
---
 generated_tests/gen_builtin_uniform_tests.py                        | 2 +-
 .../arb_compute_shader/execution/basic-uniform-access.shader_test   | 2 +-
 .../execution/multiple-texture-reading.shader_test                  | 6 +++---
 .../arb_compute_shader/execution/multiple-workgroups.shader_test    | 2 +-
 tests/spec/arb_compute_shader/execution/simple-barrier.shader_test  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
index b0c2e7b..c88add5 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -705,7 +705,7 @@ class ComputeShaderTest(ShaderTest):
 
     def make_test_init(self):
         return '''uniform int tex 0
-texture rgbw 0 ({0}, 1)
+texture rgbw 0 ({0}, 1) GL_RGBA8
 image texture 0
 fb tex 2d 0
 '''.format(len(self._test_vectors))
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
index 26b9220..ad6f82d 100644
--- a/tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test
+++ b/tests/spec/arb_compute_shader/execution/basic-uniform-access.shader_test
@@ -24,7 +24,7 @@ void main()
 
 [test]
 uniform int tex 0
-texture rgbw 0 (16, 16)
+texture rgbw 0 (16, 16) GL_RGBA8
 image texture 0
 fb tex 2d 0
 
diff --git a/tests/spec/arb_compute_shader/execution/multiple-texture-reading.shader_test b/tests/spec/arb_compute_shader/execution/multiple-texture-reading.shader_test
index c1c06d4..b13f4df 100644
--- a/tests/spec/arb_compute_shader/execution/multiple-texture-reading.shader_test
+++ b/tests/spec/arb_compute_shader/execution/multiple-texture-reading.shader_test
@@ -33,7 +33,7 @@ void main()
 
 [test]
 # Setup src0 image
-texture rgbw 0 (16, 16)
+texture rgbw 0 (16, 16) GL_RGBA8
 uniform int src0 0
 image texture 0
 fb tex 2d 0
@@ -41,7 +41,7 @@ clear color 1.0 0.0 1.0 0.0
 clear
 
 # Setup src1 image
-texture rgbw 1 (16, 16)
+texture rgbw 1 (16, 16) GL_RGBA8
 uniform int src1 1
 image texture 1
 fb tex 2d 1
@@ -49,7 +49,7 @@ clear color 0.0 1.0 0.0 1.0
 clear
 
 # Setup dst image
-texture rgbw 2 (16, 16)
+texture rgbw 2 (16, 16) GL_RGBA8
 uniform int dst 2
 image texture 2
 fb tex 2d 2
diff --git a/tests/spec/arb_compute_shader/execution/multiple-workgroups.shader_test b/tests/spec/arb_compute_shader/execution/multiple-workgroups.shader_test
index 82d3e9f..eeb3233 100644
--- a/tests/spec/arb_compute_shader/execution/multiple-workgroups.shader_test
+++ b/tests/spec/arb_compute_shader/execution/multiple-workgroups.shader_test
@@ -24,7 +24,7 @@ void main()
 
 [test]
 uniform int tex 0
-texture rgbw 0 (16, 16)
+texture rgbw 0 (16, 16) GL_RGBA8
 image texture 0
 fb tex 2d 0
 
diff --git a/tests/spec/arb_compute_shader/execution/simple-barrier.shader_test b/tests/spec/arb_compute_shader/execution/simple-barrier.shader_test
index 665b381..3f09c34 100644
--- a/tests/spec/arb_compute_shader/execution/simple-barrier.shader_test
+++ b/tests/spec/arb_compute_shader/execution/simple-barrier.shader_test
@@ -48,7 +48,7 @@ void main()
 
 [test]
 uniform int tex 0
-texture rgbw 0 (16, 16)
+texture rgbw 0 (16, 16) GL_RGBA8
 image texture 0
 fb tex 2d 0
 
-- 
2.1.4



More information about the Piglit mailing list