[Piglit] [PATCH 1/2] ext_transform_feedback: Fix default precision qualifiers

Iago Toral itoral at igalia.com
Mon Aug 3 02:06:33 PDT 2015


Hi Timothy, 

On Mon, 2015-08-03 at 18:39 +1000, Timothy Arceri wrote:
> On Mon, 2015-08-03 at 08:47 +0200, Iago Toral wrote:
> > If no body has issues with these two patches I'd like to push them later
> > this week.
> > 
> > Iago
> > 
> > On Tue, 2015-07-28 at 13:52 +0200, Iago Toral Quiroga wrote:
> > > Default ES precision qualifiers for integer types in the VS and FS
> > > are different and that should make the test fail to compile/link
> > > if Mesa actually checked for these things (because it would realize
> > > that VS outputs and FS inputs do not have the exact same type as
> > > a consequence).
> 
> I don't think this is correct. The GLES Shader Language spec says:
> 
> "Precision qualifiers for outputs in one shader matched to inputs in another
> shader need not match when
> both shaders are linked into the same program. When both shaders are in
> separate programs, mismatched 
> precision qualifiers will result in a program interface mismatch that will
> result in program pipeline 
> validation failures, as described in section 7.4.1 (“Shader Interface
> Matching”) of the OpenGL ES 3.1 
> Specification."

I had missed that, thanks for bringing it up, I'll hold back both
patches and re-think this stuff.

Iago

> So it seems they only need to match for SSO (which these piglit tests don't
> make use of).
> > > 
> > > Fix this by setting a default precision qualifier for integers.
> > > ---
> > >  tests/spec/ext_transform_feedback/structs.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/tests/spec/ext_transform_feedback/structs.c 
> > > b/tests/spec/ext_transform_feedback/structs.c
> > > index 3d90bb9..c754b9f 100644
> > > --- a/tests/spec/ext_transform_feedback/structs.c
> > > +++ b/tests/spec/ext_transform_feedback/structs.c
> > > @@ -126,6 +126,7 @@ PIGLIT_GL_TEST_CONFIG_END
> > >  static const char gles3_header[] =
> > >  	"#version 300 es\n"
> > >  	"precision highp float;\n"
> > > +	"precision highp int;\n"
> > >  	"#define DECLARE_VARYING(DIR, TYPE, NAME) flat DIR TYPE NAME\n"
> > >  	"#define VARYING(NAME) NAME\n";
> > >  
> > 
> > 
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
> 




More information about the Piglit mailing list