Created attachment 43358 [details]
Celestia screenshot mesa-7.10
r200 mesa-7.10 font distortion
With r200 and mesa-7.10, fonts appear distorted in some OpenGL applications, like Celestia, extreme-tuxracer, or oolite. In other applications they look alright, like Stellarium, or Supertuxracer.
The same distortions appear with mesa-git (as of below commit).
With mesa-7.9.1, all fonts look alright.
-- system architecture: i686
-- Linux distribution: Gentoo
-- GPU: R200 514D
-- Model: ATI Radeon 9100 QM (AGP)
-- Display connector: VGA
-- xf86-video-ati: 6.14.0
-- xserver: 1.9.2
-- mesa: 07eb660fc92b63213b542d47671b0d944286b77a
-- drm: 550fe2ca3b29ad2191eab4fdfbed9ed21e25492d
-- kernel: 2.6.38-rc3
Created attachment 43359 [details]
Celestia screenshot mesa-7.9.1
Can you bisect?
(In reply to comment #2)
> Can you bisect?
Sure, I bisected to 5d1387b2da3626326410804026f8b92f1a121fdc
Ian Romanick, "ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formats".
I tried to partially revert the commit.
It looks to me like I can add R8, R16, and RG1616 without a problem.
But when I add RG88, the distortions appear.
Created attachment 43579 [details]
screenshot extreme-tuxracer mesa-git
This screenshot from extreme-tuxracer might give a better impression of the problem. Every letter appears to get duplicated.
(In reply to comment #3)
> (In reply to comment #2)
> > Can you bisect?
> Sure, I bisected to 5d1387b2da3626326410804026f8b92f1a121fdc
> Ian Romanick, "ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal
That's pretty weird. I don't see how that change could impact r200. The only thing that seems to have a chance is if something weird happens in the GL_LUMINANCE8_ALPHA8 case. What happens if you apply this mini-patch? This isn't a fix, but it may help illuminate what's going wrong.
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index cf85a5b..75dc107 100644
@@ -464,7 +464,7 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,
- return _dri_texformat_al88;
+ return radeonChoose8888TexFormat(rmesa, format, type, fbo);
(In reply to comment #6)
> What happens if you apply this mini-patch? This
> isn't a fix, but it may help illuminate what's going wrong.
I had a look at Celestia and extreme-tuxracer, but I don't see any difference.
This is a mini-patch against mesa commit 12f25eb6d5521ad2dc61eab08331c1ea8d3c67f7
that fixes the distortions at my place.
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 7dd4a1f..47851c4 100644
@@ -2185,7 +2185,8 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
if (!ctx->_ImageTransferState &&
(dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_RG88) &&
- baseInternalFormat == srcFormat &&
+ baseInternalFormat == GL_LUMINANCE_ALPHA &&
+ srcFormat == GL_LUMINANCE_ALPHA &&
srcType == GL_UNSIGNED_BYTE &&
/* simple memcpy path */
FWIW, I was able to reproduce the extreme-tuxracer distortion
with this i686 Fedora Live CD:
Additionally I noticed weird horizontal red lines in the snow, which I've never seen before.
Apparently they're using a Mesa 7.10 snapshot from January 7.
Please reffer also to:
I have now mesa 7.11 and gnome-shell is completely unusable due to text distrotion, incorrect shadows drawing and some more artifacts. It may or may not be related. Text corruption looks very similar.
Created attachment 45460 [details] [review]
PATCH: texstore: stricter check for memcpy path for unorm88 and unorm1616
The attached patch fixes the font corruption / gnome shell misrendering with r2xx cards. It does this by restoring the original texstore behavior from before commit 5d1387b2da3626326410804026f8b92f1a121fdc for al88 / al1616 textures.
Many thanks to Nicolas Kaiser who did all the hard work of tracking this down!
I'm also doing a mesa scratch build for F-15 for those of you using that, see:
problem is the texture being uploaded is GL_LUMINANCE_ALPHA with an srcFormat/internalFormat of GL_ALPHA, I think this is legal, but the new upload code tries to memcpy in this case which is incorrect.
trying to write a piglit test to show this.
okay pushed a fix to mesa master + a piglit test to catch on r200.
(In reply to comment #14)
> fix to mesa master
e338a1b0cea94f8c57968b01eebd795c6c8ce74e ("texstore: fix regression stricter check for memcpy path for unorm88 and unorm1616"): http://cgit.freedesktop.org/mesa/mesa/commit/?id=e338a1b0cea94f8c57968b01eebd795c6c8ce74e
> piglit test to catch on r200
b70f3a0d1cda78e9ec62be6a93f05df28f625dfc ("texture-al: simple texture text for ALPHA/LUMINANCE_ALPHA"): http://cgit.freedesktop.org/piglit/commit/?id=b70f3a0d1cda78e9ec62be6a93f05df28f625dfc
Thanks a lot! The commit fixes this specific problem at my place.
*** Bug 36289 has been marked as a duplicate of this bug. ***
Just had a quick look, maybe worth cherry-picking on top of 7.10? The c-p seems trivial (no conflict). Thanks for considering.
on Mar 28, 2017 at 04:22:51.
(provided by the Example extension).