[Mesa-dev] [PATCH 05/34] main: Allow for the possibility of GL 3.2 without ARB_geometry_shader4.

Kenneth Graunke kenneth at whitecape.org
Tue Jul 30 21:25:27 PDT 2013


On 07/30/2013 07:30 PM, Paul Berry wrote:
> On 29 July 2013 11:17, Kenneth Graunke <kenneth at whitecape.org
> <mailto:kenneth at whitecape.org>> wrote:
>
>     On 07/28/2013 11:03 PM, Paul Berry wrote:
>
>         +/**
>         + * Checks if the context supports geometry shaders.
>         + */
>         +static inline GLboolean
>         +_mesa_has_geometry_shaders(const struct gl_context *ctx)
>         +{
>         +   return _mesa_is_desktop_gl(ctx) &&
>         +      (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4);
>         +}
>
>
>     I might change this to:
>
>     return _mesa_is_desktop_gl(ctx) &&
>         (ctx->Const.GLSLVersion >= 150 ||
>     ctx->Extensions.ARB_geometry___shader4);
>
>
> I have a minor preference for keeping this as is, since it's conceivable
> that we might one day want to support GLSL 1.50 on some platforms that
> don't support GL 3.2 (much as Chris Forbes is currently doing to support
> GLSL 1.30 on Gen4-5).  The places where _mesa_has_geometry_shaders() is
> used are for enabling and disabling API functionality (e.g. determining
> whether LINES_ADJACENCY is a valid primitive mode, or whether
> glFramebufferTexture() is allowed to be called), and I think that in
> this hypothetical platform that supports GLSL 1.50 but not GL 3.2, those
> pieces of functionality should be disabled.  But I admit I'm straying
> pretty far into thought experiment territory at this point.

Sure, I don't really mind keeping it as is.

I personally believe that exposing GLSL 1.50 without Geometry Shaders 
isn't legal, but I know not everyone thinks that way.  Either way, the 
GL 3.2 check better captures "the API exists" and should be largely 
equivalent anyway.



More information about the mesa-dev mailing list