[Mesa-dev] [PATCH 3/8] Support of RENDER_TYPE property [3/6] Changes to visual configs initialization.
Tomasz Lis
listom at gmail.com
Tue Jul 16 09:29:57 PDT 2013
Thank you for your feedback.
I will remove GL_TRUE/FALSE and treat these as C logic values.
I will change setting of the mutually exclusive flags. While I think using
bitwise OR emphases the fact that these are bit flags and not integer
values, both ways will work.
Please make sure someone will verify the possible clang problem - if we
can't solve this, I will just remove the whole section.
I will leave the fakeglx hunks unchanged.
2013/7/16 Brian Paul <brianp at vmware.com>
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130716/f5c9539a/attachment-0001.html>
More information about the mesa-dev
mailing list