[Piglit] [PATCH] Make the generated constant array size tests respect extensions.
Kenneth Graunke
kenneth at whitecape.org
Sat Feb 8 02:13:42 CET 2014
In 89603add5ad0bf02fcfcb7fdc0149c09f5aa2988, I neglected to update the
constant array size test generator. In the following commit, I added a
bunch of AMD_shader_trinary_minmax tests which then got generated
without the #extension directive and put in the wrong place.
Cc: Ian Romanick <idr at freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
generated_tests/gen_constant_array_size_tests.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/generated_tests/gen_constant_array_size_tests.py b/generated_tests/gen_constant_array_size_tests.py
index db885b2..99b15d0 100644
--- a/generated_tests/gen_constant_array_size_tests.py
+++ b/generated_tests/gen_constant_array_size_tests.py
@@ -147,6 +147,8 @@ class ParserTest(object):
def make_shader(self):
"""Generate the shader code necessary to test the built-in."""
shader = self.version_directive()
+ if self.__signature.extension:
+ shader += '#extension GL_{0} : require\n'.format(self.__signature.extension)
shader += self.additional_declarations()
shader += '\n'
shader += 'void main()\n'
@@ -164,9 +166,12 @@ class ParserTest(object):
def filename(self):
argtype_names = '-'.join(
str(argtype) for argtype in self.__signature.argtypes)
+ if self.__signature.extension:
+ subdir = self.__signature.extension
+ else:
+ subdir = 'glsl-{0:1.2f}'.format(float(self.glsl_version()) / 100)
return os.path.join(
- 'spec', 'glsl-{0:1.2f}'.format(float(self.glsl_version()) / 100),
- 'compiler', 'built-in-functions',
+ 'spec', subdir, 'compiler', 'built-in-functions',
'{0}-{1}.{2}'.format(
self.__signature.name, argtype_names, self.test_suffix()))
--
1.8.5.2
More information about the Piglit
mailing list