[Mesa-dev] [PATCH] mesa: fix broken glGet*(GL_POLYGON_MODE) query

Brian Paul brianp at vmware.com
Wed Jan 31 03:37:40 UTC 2018


On 01/30/2018 08:25 PM, Roland Scheidegger wrote:
> I wasn't sure if someone wanted to fix it by using special getter for
> it, but it might not be worth the trouble... Thanks!

If someone wants to do it that way, that's fine by me.  This is just 
simpler for the time being.

-Brian

> 
> Reviewed-by: Roland Scheidegger <sroland at vmware.com>
> 
> Am 31.01.2018 um 03:35 schrieb Brian Paul:
>> This reverts part of the patch which introduced the GLenum16 change.
>> Fixes a conform regression found by Roland.
>>
>> Fixes: f96a69f916aed405 ("mesa: replace GLenum with GLenum16 in
>> common structures (v4)")
>> ---
>>   src/mesa/main/get_hash_params.py | 2 +-
>>   src/mesa/main/mtypes.h           | 4 ++--
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
>> index 7cd195c..b61b16b 100644
>> --- a/src/mesa/main/get_hash_params.py
>> +++ b/src/mesa/main/get_hash_params.py
>> @@ -743,7 +743,7 @@ descriptor=[
>>     [ "PIXEL_MAP_R_TO_R_SIZE", "CONTEXT_INT(PixelMaps.RtoR.Size), NO_EXTRA" ],
>>     [ "PIXEL_MAP_S_TO_S_SIZE", "CONTEXT_INT(PixelMaps.StoS.Size), NO_EXTRA" ],
>>     [ "POINT_SIZE_GRANULARITY", "CONTEXT_FLOAT(Const.PointSizeGranularity), NO_EXTRA" ],
>> -  [ "POLYGON_MODE", "CONTEXT_ENUM16(Polygon.FrontMode), NO_EXTRA" ],
>> +  [ "POLYGON_MODE", "CONTEXT_ENUM2(Polygon.FrontMode), NO_EXTRA" ],
>>     [ "POLYGON_OFFSET_BIAS_EXT", "CONTEXT_FLOAT(Polygon.OffsetUnits), NO_EXTRA" ],
>>     [ "POLYGON_OFFSET_POINT", "CONTEXT_BOOL(Polygon.OffsetPoint), NO_EXTRA" ],
>>     [ "POLYGON_OFFSET_LINE", "CONTEXT_BOOL(Polygon.OffsetLine), NO_EXTRA" ],
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index 35fafa5..f6fa6f4 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -843,8 +843,8 @@ struct gl_point_attrib
>>   struct gl_polygon_attrib
>>   {
>>      GLenum16 FrontFace;		/**< Either GL_CW or GL_CCW */
>> -   GLenum16 FrontMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
>> -   GLenum16 BackMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
>> +   GLenum FrontMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
>> +   GLenum BackMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
>>      GLboolean CullFlag;		/**< Culling on/off flag */
>>      GLboolean SmoothFlag;	/**< True if GL_POLYGON_SMOOTH is enabled */
>>      GLboolean StippleFlag;	/**< True if GL_POLYGON_STIPPLE is enabled */
>>
> 



More information about the mesa-dev mailing list