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

Francisco Jerez currojerez at riseup.net
Wed Nov 10 07:44:20 PST 2010


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.

BTW, can I have your Acked-by?

> 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.

> -Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20101110/04d85109/attachment-0001.pgp>


More information about the mesa-dev mailing list