diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-11-08 15:47:35 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-11-09 11:57:45 -0800 |
commit | 0e1ca4595d87fe0660a077a55cd5eff865edae7a (patch) | |
tree | 1ee198df64e29adb0da537649bd9d7e63831a431 /framework | |
parent | da2a3f6201a1005dfa43a817987098e95a0edf7d (diff) |
framework/test/shader_test: Fix MultiShaderRunner handling of directories
Currently MultiShaderRunner (used with --process-isolation false)
expects each directory will contain either GL, GLES2, or GLES3 shaders.
The barrier between GLES2 and GLES3 is somewhat artificial, since they
can be promoted to GLES3. This patch allows GLES2 and GLES3 shaders to
be run together but still enforces a separation between GLES and GL
shaders.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/test/shader_test.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py index 447e8c0aa..8c493d516 100644 --- a/framework/test/shader_test.py +++ b/framework/test/shader_test.py @@ -200,7 +200,21 @@ class MultiShaderTest(ReducedProcessMixin, PiglitBaseTest): subtest = os.path.basename(os.path.splitext(each)[0]).lower() if prog is not None: - assert parser.prog == prog + # This allows mixing GLES2 and GLES3 shader test files + # together. Since GLES2 profiles can be promoted to GLES3, this + # is fine. + if parser.prog != prog: + # Pylint can't figure out that prog is not None. + if 'gles' in parser.prog and 'gles' in prog: # pylint: disable=unsupported-membership-test + prog = max(parser.prog, prog) + else: + # The only way we can get here is if one is GLES and + # one is not, since there is only one desktop runner + # thus it will never fail the is parser.prog != prog + # check + raise exceptions.PiglitInternalError( + 'GLES and GL shaders in the same command!\n' + 'Cannot pick a shader_runner binary!') else: prog = parser.prog |