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

Ian Romanick idr at freedesktop.org
Wed Jul 31 16:09:36 PDT 2013


On 07/30/2013 09:25 PM, Kenneth Graunke wrote:
> 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.

Except that we need some way to determine when to enable 3.2 in 
compute_version.  Using either GLSL version or this flag would do it.

We have already encountered at least one application that wants to use 
GLSL 3.30 without geometry shaders (Dota2), so the plan of enabling 
higher GLSL versions without the rest of the core GL version may not be 
so crazy.  However, we might just want to do it for whitelisted apps.

*shrug*

> _______________________________________________
> 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