OSDN Git Service

texstore: fix regression stricter check for memcpy path for unorm88 and unorm1616
authorHans de Goede <hdegoede@redhat.com>
Sun, 10 Apr 2011 20:21:03 +0000 (22:21 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 12 Apr 2011 10:32:45 +0000 (20:32 +1000)
commite338a1b0cea94f8c57968b01eebd795c6c8ce74e
tree427bfe8e14524d297bf6fb984d2ea496849ac106
parent847f991a87b9549eb89a521edb7cd149005006bb
texstore: fix regression stricter check for memcpy path for unorm88 and unorm1616

According to https://bugs.freedesktop.org/show_bug.cgi?id=34280
commit 5d1387b2da3626326410804026f8b92f1a121fdc causes the font corruption
problems people have been seeing under various apps and gnome-shell on r200
cards.

This commit changed (loosened) the check for using the memcpy path in the
former al88 / al1616 texstore functions, which are now also used to
store rg texures. This patch restores the old strict check in case of
al textures. I've no idea why this fixes things, since I don't know the
code in question at all. But after seeing the bisect in bfdo34280 point
to this commit, I gave this fix a try and it fixes the font issues seen on
r200 cards.

[airlied:
r200 has no native working A8, so it does an internal storage format of AL88
however srcFormat == internalFormat == ALPHA when we get to this point,
so it copies, but it wants to store into an AL88 not ALPHA so fails,
I'll also push a piglit test for this on r200].

Many thanks to Nicolas Kaiser who did all the hard work of tracking this down!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/texstore.c