[Mesa-dev] [PATCH v3] mesa: enable enums for OES_geometry_shader

Lofstedt, Marta marta.lofstedt at intel.com
Wed Dec 2 03:38:46 PST 2015


> -----Original Message-----
> From: ibmirkin at gmail.com [mailto:ibmirkin at gmail.com] On Behalf Of Ilia
> Mirkin
> Sent: Tuesday, December 1, 2015 5:34 PM
> To: Lofstedt, Marta
> Cc: Marta Lofstedt; mesa-dev at lists.freedesktop.org
> Subject: Re: [PATCH v3] mesa: enable enums for OES_geometry_shader
> 
> On Tue, Dec 1, 2015 at 11:24 AM, Lofstedt, Marta
> <marta.lofstedt at intel.com> wrote:
> >> > +static const int extra_ARB_viewport_array_or_geometry_shader[] = {
> >> > +   EXT(ARB_viewport_array),
> >> > +   EXT(OES_geometry_shader),
> >> > +   EXTRA_END
> >> > +};
> >>
> >> This won't do what you want... unless drivers only ever set
> >> OES_geometry_shader to true in ES contexts, which is not the way it's
> >> usually done in mesa. That said they *are* careful about only setting
> >> ARB_viewport_array in core contexts (due to the GS dependency).
> >
> > I am now confused about what you really want here.
> > Do you want me to only check these enums for oes_geometry_shader?
> > We have the same situation for gpu_shader5, right?
> 
> As always, what I really want is for it to work :) Any way you choose to
> achieve that is fine by me. As it stands, I could have a situation where
> ARB_viewport_array = false, OES_geometry_shader = true, and I'm in a
> desktop GL 3.2 core context, and now all of a sudden that
> extra_ARB_viewport_array_or_geometry_shader thing is true. But... you
> don't want it to be.
> 
>   -ilia

I of course also want this to work. So, let us continue the discussion on how to solve this.

So how about I get the EXTRA_EXT_VIEWPORT_GS back and then do:
api_found = ctx->Extensions.ARB_viewport_array || _mesa_has_OES_geometry_shader(ctx)

My understanding is that Nanleys  new _mesa_has_##name_str helper will check the versions in the extension_table.
Since oes_geometry_shader is only enabled for GLES 3.1, your example above will fail on both tests.

Here is a quote from oes_geometry_shader spec:
"LAYER_PROVOKING_VERTEX_OES query from ARB_provoking_vertex
ARB_viewport_array (but did not add ProvokingVertex control, just this query)."
My interpretation is that this enum does not need ARB_viewport_array.
For the gpu_shader5 enum I haven't found in any clear quots from the spec.

BR,
Marta

 


More information about the mesa-dev mailing list