[Mesa-dev] [PATCH] mesa: update color material in GetMaterialfv

Tapani Pälli tapani.palli at intel.com
Wed May 23 08:47:23 PDT 2012


Hello;

On 05/23/2012 05:53 PM, Brian Paul wrote:
> On 05/23/2012 12:33 AM, Tapani Pälli wrote:
>> color material state gets reseted when vertices are flushed,
>> update state after flush. this change is written against piglit
>> test 'colormaterial-query'.
>>
>> Signed-off-by: Tapani Pälli<tapani.palli at intel.com>
>> ---
>>   src/mesa/main/light.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
>> index 38ec1b6..7b7d72c 100644
>> --- a/src/mesa/main/light.c
>> +++ b/src/mesa/main/light.c
>> @@ -761,6 +761,10 @@ _mesa_GetMaterialfv( GLenum face, GLenum pname,
>> GLfloat *params )
>>
>>      FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex
>> buffer */
>>
>> +   /* flush vertices resets state, update color material */
>> +   if(ctx->Light.ColorMaterialEnabled)
>> +     
>> _mesa_update_color_material(ctx,ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
>> +
>>      if (face==GL_FRONT) {
>>         f = 0;
>>      }
> 
> I tried your new piglit test with Mesa/master as of today and the test
> passes.
> 
> It looks like this commit from May 8 fixed the problem:
> 
> commit 1bc16bf98a1b5a4cca0c0ae2a80ba7982c6e4651
> Author: Brian Paul <brianp at vmware.com>
> Date:   Tue May 8 11:41:03 2012 -0600
> 
>     mesa: fix glMaterial / dlist bug
> 
> 
> Can you test Mesa/master without your patch and see what happens?

Yep, it seems the bug is fixed in master, thanks. Now I know what to do
as first step with my next bug on then list :)


> -Brian


-- 

// Tapani


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120523/8f6e915e/attachment.pgp>


More information about the mesa-dev mailing list