[Mesa-dev] [PATCH 3/8] Support of RENDER_TYPE property [3/6] Changes to visual configs initialization.

Brian Paul brianp at vmware.com
Tue Jul 16 05:45:41 PDT 2013


On 07/15/2013 12:33 PM, Ian Romanick wrote:
> On 07/15/2013 07:28 AM, Tomasz Lis wrote:
[...]
>> diff --git a/src/mesa/drivers/x11/fakeglx.c
>> b/src/mesa/drivers/x11/fakeglx.c
>> index 969ee7d..7a2cfbe 100644
>> --- a/src/mesa/drivers/x11/fakeglx.c
>> +++ b/src/mesa/drivers/x11/fakeglx.c
>
> I'm not sure these last two hunks are necessary.  I don't think the
> fakeglx patch can ever see float configs.  Brian knows that code much
> better than I do.

They don't do any harm, AFAICT.  It's possible I might add float support 
to the fake glx code someday.


>> @@ -1090,6 +1090,9 @@ choose_visual( Display *dpy, int screen, const
>> int *list, GLboolean fbConfig )
>>               else if (*parselist & GLX_COLOR_INDEX_BIT) {
>>                  rgb_flag = GL_FALSE;
>>               }
>> +            else if (*parselist &
>> (GLX_RGBA_FLOAT_BIT_ARB|GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)) {
>> +               rgb_flag = GL_TRUE;
>> +            }
>>               else if (*parselist == 0) {
>>                  rgb_flag = GL_TRUE;
>>               }
>> @@ -1761,7 +1764,9 @@ get_config( XMesaVisual xmvis, int attrib, int
>> *value, GLboolean fbconfig )
>>         case GLX_RENDER_TYPE_SGIX:
>>            if (!fbconfig)
>>               return GLX_BAD_ATTRIBUTE;
>> -         if (xmvis->mesa_visual.rgbMode)
>> +         if (xmvis->mesa_visual.floatMode)
>> +            *value = GLX_RGBA_FLOAT_BIT_ARB;
>> +         else if (xmvis->mesa_visual.rgbMode)
>>               *value = GLX_RGBA_BIT;
>>            else
>>               *value = GLX_COLOR_INDEX_BIT;
>>

-Brian




More information about the mesa-dev mailing list