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

Brian Paul brianp at vmware.com
Wed Nov 10 07:49:09 PST 2010


On 11/10/2010 08:44 AM, Francisco Jerez wrote:
> Brian Paul<brianp at vmware.com>  writes:
>
>> 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.
>>
> Yes it does, there are programs using alpha-tested bitmaps. Last time I
> saw it, it was more of an accident than a necessity. A well known GL
> game (the name... I forgot ;-) was triggering this fallback while
> rendering bitmap text over alpha-tested geometry.

OK, I didn't know that.


> BTW, can I have your Acked-by?

Acked-by: Brian Paul <brianp at vmware.com>



>> 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.
>>
> OK, I'll do that.

Thanks!

-Brian


More information about the mesa-dev mailing list