On 09/11/16 08:51 AM, Dylan Baker wrote: > 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. > > cc: Marek Olšák <mar...@gmail.com> > Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com> > --- > framework/test/shader_test.py | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py > index 447e8c0..1966149 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 > + # and so 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 > >
Tested-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit