[Mesa-dev] Making undefined macros an error for GLES3

Carl Worth cworth at cworth.org
Thu Nov 22 08:57:50 PST 2012


Here are a couple of patches to implement the desired behavior for Ian's
recently-proposed undefined-macro.vert test, (where "#if undefined_macro"
should cause an error for GLES3).

The first patch lays the groundwork for the new, conditional treatment of
undefined macros. This commit should be ready for review now. In my testing it
doesn't cause any behavioral change, (as intended).

The second patch is along the lines of what we actually want to make the
behavior different for GLES3. I ran into two problems trying to test this
patch, both of which might simply be things I need to fix in my environment:

1. When trying to run the undefined-macro.vert test I'm getting the following
   error:

	GLSL version is 1.300000, but requested version 3.000000 is required

   This is triggered by the "glsl_version: 3.00" of the test. What do I need
   to do to have that version available when running the test? (I am using the
   gles3 branch of mesa at least.)

2. I can't actually compile the condition I used in the patch:

	if (parser->api == API_OPENGLES3)

   This is a guess on my part as to what the condition we want should be. But
   I don't have any such API_OPENGLES3 symbol available—I just made that
   up. So what needs to happen here?

Thanks in advance for any feedback or help.

-Carl



More information about the mesa-dev mailing list