[Mesa-dev] [PATCH 2/2] meta: Handle bitmaps with alpha test enabled.

Brian Paul brianp at vmware.com
Wed Nov 10 06:16:49 PST 2010


On 11/10/2010 05:41 AM, Francisco Jerez wrote:
> Brian Paul<brianp at vmware.com>  writes:
>>
>> Of course, we _could_ do the comparison with ints but we'd have to
>> query the number of framebuffer alpha bits, convert the floats to ints
>> with the right number of bits, then compare (to match the
>> hardware). It seems to be a lot of extra work for no good reason.
>>
> OK, here's a patch doing the same with floats.


I don't think this will make much of a difference in practice, but I'm 
OK with it.

One suggestion would be to move the alpha-enabled test out of the 
function so that we could do this:

    if (ctx->Color.AlphaEnabled && !alpha_test_raster_color(ctx))
       return;

to avoid the cost of calling the function every time.

-Brian


More information about the mesa-dev mailing list