[Piglit] [PATCH 4/4] generators: Add a simple generator for enabled and disabled defines

Dylan Baker baker.dylan.c at gmail.com
Tue Apr 12 20:05:52 UTC 2016


Quoting Ilia Mirkin (2016-04-12 12:09:41)
> On Tue, Apr 12, 2016 at 3:07 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > Quoting Ilia Mirkin (2016-04-12 08:08:46)
> >> On Tue, Apr 12, 2016 at 3:49 AM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> >> > +/* This is a generated test, do not edit
> >> > + * Generated by gen_extensions_defined.py
> >> > + *
> >> > + * [config]
> >> > + * expect_result: pass
> >> > + * glsl_version: ${version.print_float()}
> >> > + * require_extensions: !${extension} ${' '.join(extra_extensions)}
> >> > + * [end config]
> >> > + */
> >> > +
> >> > +#version ${str(version)}
> >> > +% for ext in extra_extensions:
> >> > +  #extension ${ext} : require
> >> > +% endfor
> >> > +
> >> > +#if defined ${extension}
> >> > +#    error ${extension} is defined, but should not be
> >> > +#endif
> >> > +
> >> > +float foo() { return 0.0; }
> >>
> >> [Let's try again, with trimming... stupid phone.]
> >>
> >> This only tests for the extension being not defined. It doesn't test
> >> for one still being able to enable the functionality with
> >>
> >> #extension foo: require
> >
> > I'm going to ask a noob question here because I'm still trying to get my
> > head around all of this preprocessor stuff. That template should look
> > something like:
> >
> > // [config]
> > // expect_result: fail
> > // glsl_version ${version.print_float()}
> > // require_extensions: !${extension} ${' '.join(extra_extensions)}
> > // [end config]
> >
> > #version ${str(version)}
> > % for ext in extra_extensions:
> >   #extension ${ext} : require
> > % endfor
> > #extension ${extension} : require
> >
> > float foo() { return 0.0; }
> 
> That appears fine to me. Could be worth a test though :)
> 
> I'm not 100% sure under what situation you'd ever set the
> extra_extensions TBH, but... wtvr.

tesselation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160412/46cade5e/attachment.sig>


More information about the Piglit mailing list