[Mesa-dev] [PATCH] mesa: fix GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT query

Ian Romanick idr at freedesktop.org
Tue Jul 18 18:19:46 UTC 2017


Also... I'm not a huge fan of a Reviewed-by from someone new to the
mailing list with zero commits in Mesa resulting in an instant commit
(no offense to Neha).  That's not okay.  For the review system to have
value, we have to give people time to respond to patches.  This patch
hit the list less than 24 hours ago.

On 07/18/2017 11:11 AM, Ian Romanick wrote:
> On 07/17/2017 11:28 AM, Brian Paul wrote:
>> This query is not allowed in GL core profile 3.3 and later (since
>> GL_QUADS and GL_QUAD_STRIP are disallowed).  The query was (mistakenly)
>> supported in GL 3.2.  This fixes the glGet error test accordingly.
>> ---
>>  src/mesa/main/get.c              | 12 ++++++++++++
>>  src/mesa/main/get_hash_params.py |  2 +-
>>  2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
>> index 6ad107b..3247653 100644
>> --- a/src/mesa/main/get.c
>> +++ b/src/mesa/main/get.c
>> @@ -162,6 +162,7 @@ enum value_extra {
>>     EXTRA_EXT_SSBO_GS,
>>     EXTRA_EXT_FB_NO_ATTACH_GS,
>>     EXTRA_EXT_ES_GS,
>> +   EXTRA_EXT_PROVOKING_VERTEX_32,
>>  };
>>  
>>  #define NO_EXTRA NULL
>> @@ -573,6 +574,12 @@ static const int extra_EXT_shader_framebuffer_fetch[] = {
>>     EXTRA_END
>>  };
>>  
>> +static const int extra_EXT_provoking_vertex_32[] = {
>> +   EXTRA_EXT_PROVOKING_VERTEX_32,
>> +   EXTRA_END
>> +};
>> +
>> +
>>  /* This is the big table describing all the enums we accept in
>>   * glGet*v().  The table is partitioned into six parts: enums
>>   * understood by all GL APIs (OpenGL, GLES and GLES2), enums shared
>> @@ -1293,6 +1300,11 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
>>           if (_mesa_has_OES_geometry_shader(ctx))
>>              api_found = GL_TRUE;
>>           break;
>> +      case EXTRA_EXT_PROVOKING_VERTEX_32:
>> +         api_check = TRUE;
>> +         if (version <= 32)
>> +            api_found = ctx->Extensions.EXT_provoking_vertex;
> 
> But we also shouldn't support it in OpenGL 3.1 because we don't expose
> GL_ARB_compatibility, right?  It seems like this should check api ==
> API_OPENGL_COMPAT instead.
> 
>> +         break;
>>        case EXTRA_END:
>>  	 break;
>>        default: /* *e is a offset into the extension struct */
>> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
>> index 850ce7d..9d67ca4 100644
>> --- a/src/mesa/main/get_hash_params.py
>> +++ b/src/mesa/main/get_hash_params.py
>> @@ -888,7 +888,7 @@ descriptor=[
>>  
>>  # GL_EXT_provoking_vertex
>>    [ "PROVOKING_VERTEX_EXT", "CONTEXT_ENUM(Light.ProvokingVertex), extra_EXT_provoking_vertex" ],
>> -  [ "QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT", "CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention), extra_EXT_provoking_vertex" ],
>> +  [ "QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT", "CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention), extra_EXT_provoking_vertex_32" ],
> 
> Wouldn't it be easier to just move this to a section that is only valid
> for compatibility profile?  Though there may not be one yet...
> 
>>  
>>  # GL_ARB_seamless_cube_map
>>    [ "TEXTURE_CUBE_MAP_SEAMLESS", "CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map" ],
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list