[Mesa-dev] [PATCH v2 5/6] mesa: Update _mesa_has_geometry_shaders
Nanley Chery
nanleychery at gmail.com
Tue Dec 1 09:50:36 PST 2015
On Tue, Dec 01, 2015 at 04:03:22PM +0000, Lofstedt, Marta wrote:
> > -----Original Message-----
> > From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> > Behalf Of Lofstedt, Marta
> > Sent: Tuesday, December 1, 2015 4:48 PM
> > To: Emil Velikov; Marta Lofstedt
> > Cc: ML mesa-dev
> > Subject: Re: [Mesa-dev] [PATCH v2 5/6] mesa: Update
> > _mesa_has_geometry_shaders
> >
> >
> >
> > > -----Original Message-----
> > > From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> > > Behalf Of Emil Velikov
> > > Sent: Friday, November 27, 2015 4:19 PM
> > > To: Marta Lofstedt
> > > Cc: ML mesa-dev
> > > Subject: Re: [Mesa-dev] [PATCH v2 5/6] mesa: Update
> > > _mesa_has_geometry_shaders
> > >
> > > On 27 November 2015 at 14:31, Marta Lofstedt
> > > <marta.lofstedt at linux.intel.com> wrote:
> > > > From: Marta Lofstedt <marta.lofstedt at intel.com>
> > > >
> > > > Updates the _mesa_has_geometry_shaders function to also look for
> > > > OpenGL ES 3.1 contexts that has OES_geometry_shader enabled.
> > > > ---
> > > > src/mesa/main/context.h | 3 ++-
> > > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index
> > > > 8b64f45..23b2718 100644
> > > > --- a/src/mesa/main/context.h
> > > > +++ b/src/mesa/main/context.h
> > > > @@ -330,7 +330,8 @@ _mesa_is_gles31(const struct gl_context *ctx)
> > > > static inline bool _mesa_has_geometry_shaders(const struct
> > > > gl_context
> > > > *ctx) {
> > > > - return _mesa_is_desktop_gl(ctx) && ctx->Version >= 32;
> > > > + return (_mesa_is_gles31(ctx) &&
> > > > + ctx->Extensions.OES_geometry_shader) ||
> > >
> > > Please use the new _mesa_has_##name_str helpers from Nanley. They
> > > already have the appropriate API and version check -
> > > _mesa_has_OES_geometry_shader is what we want here.
> > >
> > Oh, that's a cool new feature.
> > I'll send up a V3.
> > Unfortunately I have problem getting the name_str helper to work and I am
> > not entirely sure if it is for all gles context or only because I am on gles
> > version override. I will send up a patch for this where we can discuss further.
> >
> Hi Nanley,
>
> I can't seem to get you ##name_str helper to work. I was planning to send up a patch changing ctx->Extension.Version to ctx->Version in the helper, because that works. But then I noticed that you had ctx->Version before you added the ctx->Extension.Version. So, now I am not sure how to use your nice feature.
>
Hi Marta,
You seem to have discovered a bug. My patch which introduced
gl_context::Extension::Version updates the field at context creation
time and when entering/exiting meta. It unfortunately overlooked
updating the field when the version is overridden. I'll send out a
patch for this.
Thanks,
Nanley
> /Marta
>
> > >
> > > -Emil
> > > _______________________________________________
> > > mesa-dev mailing list
> > > mesa-dev at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list