[Mesa-dev] [PATCH] glx/dri: Initialize api even if num_attribs == 0.

Kenneth Graunke kenneth at whitecape.org
Tue Jan 10 23:55:44 PST 2012


On 01/10/2012 11:47 PM, Vadim Girlin wrote:
> On Tue, 2012-01-10 at 23:36 -0800, Kenneth Graunke wrote:
>> Both dri2_create_context_attribs and drisw_create_context_attribs call
>> dri2_convert_glx_attribs, expecting it to fill in *api on success.
>>
>> However, when num_attribs == 0, it was returning true without setting
>> *api, causing the caller to use an uninitialized value.
>>
>> Cc: Vadim Girlin<vadimgirlin at gmail.com>
>> Signed-off-by: Kenneth Graunke<kenneth at whitecape.org>
>> ---
>>   src/glx/dri_common.c |    4 +++-
>>   1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> Vadim, hopefully this should also fix Unigine Heaven for you.
>
> Yes, this patch works too, thanks.
>
> By the way, to run Heaven I had to build the xserver with the patches
> from xorg-devel:
> http://lists.x.org/archives/xorg-devel/2011-December/028091.html
>
> I'm not sure if there is another way.
>
> Vadim

Ah!  Of course.  I completely forgot that we needed X server patches. 
Thanks for solving that mystery.


More information about the mesa-dev mailing list