[Piglit] [PATCH] generated builtin_uniform: Fix dimensions of cs tests

Jordan Justen jordan.l.justen at intel.com
Mon Dec 8 00:17:06 PST 2014


Previously we created a 16 x 16 texture. But, the generated tests
require a variable width based on the number of sub-test-cases. The
tests also only need a texture with a height of 1.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
On Nvidia, this allows 211 more tests to pass.

 generated_tests/gen_builtin_uniform_tests.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
index 0285dd3..3ff9452 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -662,7 +662,9 @@ class ComputeShaderTest(ShaderTest):
 
     def make_compute_shader(self):
         additional_declarations = 'writeonly uniform image2D tex;\n'
-        additional_declarations += 'layout(local_size_x = 16, local_size_y = 16) in;\n'
+        num_tests = len(self._test_vectors)
+        layout_tmpl = 'layout(local_size_x = {0}) in;\n'
+        additional_declarations += layout_tmpl.format(num_tests)
         return self.make_test_shader(
             additional_declarations,
             '  vec4 tmp_color;\n',
@@ -672,10 +674,10 @@ class ComputeShaderTest(ShaderTest):
 
     def make_test_init(self):
         return '''uniform int tex 0
-texture rgbw 0 (16, 16)
+texture rgbw 0 ({0}, 1)
 image texture 0
 fb tex 2d 0
-'''
+'''.format(len(self._test_vectors))
 
 
     def draw_command(self):
-- 
2.1.3



More information about the Piglit mailing list