[Piglit] [PATCH 1/2] shader_runner.py Update regex to detect new require section syntax
Tom Gall
tom.gall at linaro.org
Mon Jan 21 19:50:44 PST 2013
With commit dadf56dad25730556e36e9446aabfc80458cc12f the syntax
for the [require] section in the shader test data files changed for
GL ES. This patch, updates the shader_runner.py regex to also
understand the new syntax since this code parses the [require]
section of the shader test data file to determine which
shader_runner binary to run.
When dispatch is implemented for GLES all this can go away.
v2: formatting, better description, no GLSL ES, GLSL detection.
Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
framework/shader_test.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/framework/shader_test.py b/framework/shader_test.py
index 335a6c1..03478fc 100755
--- a/framework/shader_test.py
+++ b/framework/shader_test.py
@@ -107,16 +107,16 @@ class ShaderTest(PlainExecTest):
common = {
'cmp' : r'(<|<=|=|>=|>)',
'gl_version' : r'(\d.\d)',
- 'gles2_version' : r'(2.\d\s+es)',
- 'gles3_version' : r'(3.\d\s+es)',
+ 'gles2_version' : r'(2.\d\s)',
+ 'gles3_version' : r'(3.\d\s)',
'comment' : r'(#.*)',
}
cls.__re_require_header = re.compile(r'^\s*\[require\]\s*{comment}?$'.format(**common))
cls.__re_end_require_block = re.compile(r'^\s*\['.format(*common))
cls.__re_gl = re.compile(r'^\s*GL\s*{cmp}\s*{gl_version}\s*{comment}?$'.format(**common))
- cls.__re_gles2 = re.compile(r'^\s*GL\s*{cmp}\s*{gles2_version}\s*{comment}?$'.format(**common))
- cls.__re_gles3 = re.compile(r'^\s*GL\s*{cmp}\s*{gles3_version}\s*{comment}?$'.format(**common))
+ cls.__re_gles2 = re.compile(r'^\s*GL ES\s*{cmp}\s*{gles2_version}\s*{comment}?$'.format(**common))
+ cls.__re_gles3 = re.compile(r'^\s*GL ES\s*{cmp}\s*{gles3_version}\s*{comment}?$'.format(**common))
cls.__re_gl_unknown = re.compile(r'^\s*GL\s*{cmp}'.format(**common))
def __init__(self, shader_runner_args, run_standalone=False):
--
1.7.10.4
More information about the Piglit
mailing list