[Piglit] [PATCH 1/2] glslparsertest: Allow ! in extension list to require non-support.
Kenneth Graunke
kenneth at whitecape.org
Mon Mar 12 12:59:30 PDT 2012
On 03/12/2012 12:39 PM, Eric Anholt wrote:
> On Mon, 12 Mar 2012 00:10:16 -0700, Kenneth Graunke<kenneth at whitecape.org> wrote:
>> For example:
>> // [config]
>> // required_extensions: !GL_ARB_draw_instanced
>> // [end config]
>> will cause the test to run only if the GL_ARB_draw_instanced is _not_
>> advertised.
>
> Seems like a reasonable feature.
>
> Reviewed-by: Eric Anholt<eric at anholt.net>
Cool, thanks!
> For the feature macro testing, I'm thinking we should probably have a C
> test that encodes what we understand about how the feature macros work
> and how to test them using command-line args, instead of writing tests
> per-extension (or, in the current case, just for the one extension we
> bothered with).
>
> I haven't reviewed the second patch, because while it looks sane to me,
> I seem to recall that idr's interpretation was that the macros didn't
> exist unless you #extensioned. But I may be totally wrong.
idr was mistaken. The macros always exist...and in fact, that's
precisely what makes them useful. That lets you do things like:
#ifdef GL_ARB_draw_instanced
#define instanceID gl_InstanceIDARB
#else
uniform int instanceID;
#endif
and then have one set of shaders which work regardless of whether the
extension is present.
More information about the Piglit
mailing list