Bug 35998 - RS600: Texture alignment issues under Gnome Shell
Summary: RS600: Texture alignment issues under Gnome Shell
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 89686 92651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-05 10:50 UTC by Simao Reis
Modified: 2019-09-18 18:50 UTC (History)
9 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Artifacts under Gnome Shell (905.93 KB, image/png)
2011-04-05 10:50 UTC, Simao Reis
Details
glxinfo (23.94 KB, text/plain)
2011-04-05 13:15 UTC, Simao Reis
Details
glxinfo output (23.51 KB, text/plain)
2011-04-11 15:20 UTC, Milan Plzik
Details
R300 texture alignment partial fix (796 bytes, patch)
2011-05-14 07:02 UTC, Milan Plzik
Details | Splinter Review
little experiment (1.79 KB, patch)
2011-05-15 18:13 UTC, Marek Olšák
Details | Splinter Review
Same(?) text rendering issues as original reporter had (81.65 KB, image/png)
2013-04-28 10:40 UTC, Madis Liias
Details
chromium BSU also show this bug (592.58 KB, image/png)
2016-02-11 01:51 UTC, Andrew Randrianasulu
Details
dmesg (58.64 KB, text/plain)
2016-02-11 01:55 UTC, Andrew Randrianasulu
Details
mmiotrace from Catalyst 9.3 kernel 2.6.27.27 (363.32 KB, application/octet-stream)
2016-02-21 18:27 UTC, Andrew Randrianasulu
Details
chromium BSU log with RADEON_DEBUG=texalloc (29.37 KB, text/plain)
2016-02-28 13:53 UTC, Andrew Randrianasulu
Details
chromium BSU debug log with RADEON_DEBUG=texalloc,notiling (18.38 KB, text/plain)
2016-02-28 13:56 UTC, Andrew Randrianasulu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simao Reis 2011-04-05 10:50:54 UTC
Created attachment 45301 [details]
Artifacts under Gnome Shell

gnome-shell from git
clutter-1.6 (git)

kernel-2.6.38.2-11.fc15.x86_64

Mesa versions:

$ rpm -qa | grep  mesa
mesa-dri-drivers-dri1-7.11-0.5.20110401.0.fc14.x86_64
mesa-libEGL-7.11-0.5.20110401.0.fc14.x86_64
mesa-dri-llvmcore-7.11-0.5.20110401.0.fc14.x86_64
mesa-libEGL-devel-7.11-0.5.20110401.0.fc14.x86_64
mesa-dri-drivers-7.11-0.5.20110401.0.fc14.x86_64
mesa-libOSMesa-devel-7.11-0.5.20110401.0.fc14.x86_64
mesa-libOSMesa-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGLU-devel-7.11-0.5.20110401.0.fc14.x86_64
mesa-dri-filesystem-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGLES-devel-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGL-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGL-devel-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGLU-7.11-0.5.20110401.0.fc14.x86_64
mesa-libGLES-7.11-0.5.20110401.0.fc14.x86_64

$ lspci

01:05.0 VGA compatible controller: ATI Technologies Inc Radeon Xpress 1250
Comment 1 Alex Deucher 2011-04-05 12:47:36 UTC
Are you using r300c or r300g?  Please attach the output of glxinfo.
Comment 2 Simao Reis 2011-04-05 13:15:25 UTC
Created attachment 45316 [details]
glxinfo
Comment 3 Alex Deucher 2011-04-05 13:19:31 UTC
You are using the gallium driver.
Comment 4 Milan Plzik 2011-04-11 15:20:55 UTC
Created attachment 45494 [details]
glxinfo output

Same happens to me, lspci output is:
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon Xpress 1250

hardware is Dell Latitude XT.
Comment 5 robhae 2011-04-16 01:53:47 UTC
Same artifacts here. x1250 (Gallium-Driver) on Samsung R60
Comment 6 Milan Plzik 2011-04-23 14:10:28 UTC
Looks like this font issue can be triggered (at least for me) by http://wiki.clutter-project.org/wiki/File:COGLBasicsExample.zip , so the problem might be clutter/cogl-related. Also, relationship with 'font glitches' from https://bugs.freedesktop.org/show_bug.cgi?id=29139 is possible.
Comment 7 Marek Olšák 2011-05-06 05:53:07 UTC
It looks like only the very thin characters misrender.

Unfortunately, I don't have RS600.
Comment 8 Milan Plzik 2011-05-07 05:57:44 UTC
(In reply to comment #7)
> It looks like only the very thin characters misrender.

  I'm not sure whether this is width-related; I see misrenderd also 'S', 'v', '2', and some others, and I believe (but unfortunately I don't have a screenshot) that under some circumstances, the set of affected glyphs changes.

> 
> Unfortunately, I don't have RS600.

  If it will be of some use, I can test patches, do some basic debugging, or provide remote access to RS600 machine.
Comment 9 Milan Plzik 2011-05-14 07:02:04 UTC
Created attachment 46709 [details] [review]
R300 texture alignment partial fix

As Marek stated, this issue is related to texture alignment. After playing with mesa/src/gallium/drivers/r300/r300_texture_desc.c (see attached patch), I was able to get things rendering properly -- font issue disappeared with setting 'height' alignment of 8bpp textures to '2' and misrendered artifacts on some round edges with 32bpp textures and 'height' alignment to 2. Patch contains only values I needed to fix -- I guess there is some relation between parts of array I've been modifying. 

Unfortunately, this patch causes, that some (random) of GNOME 3's popup windows are being rendered improperly -- their content looks like portions of other textures (e.g. desktop background, icons, ...; random parts of vram), with no apparent relation to expected content.
Comment 10 Alex Deucher 2011-05-14 09:34:43 UTC
RS600/RS690/RS740 require 64 bit texture pitch alignment, perhaps the tile alignment needs some adjustment as well.
Comment 11 Alex Deucher 2011-05-14 09:55:26 UTC
*64 byte
Comment 12 Milan Plzik 2011-05-14 14:04:05 UTC
I'm sorry, I was talking about tile alignment whole time, the modified function was r300_get_pixel_alignment, which definitely returns "tile" . Sorry for confusion.
Comment 13 Milan Plzik 2011-05-15 10:34:56 UTC
After more thorough testing, it seems that r300 driver is not able to correctly create surfaces of certain dimensions; random vram content is shown instead. Also, it doesn't seem to change, despite of application changing contents of its window. I tried some more changes in the alignment table (like multiplying related alignments by two), but it had only negative effect.
Comment 14 Marek Olšák 2011-05-15 18:13:03 UTC
Created attachment 46752 [details] [review]
little experiment

(In reply to comment #13)
> After more thorough testing, it seems that r300 driver is not able to correctly
> create surfaces of certain dimensions; random vram content is shown instead.

Not true. The r300 driver gets it right for all the other GPUs, it's just rs6xx that is broken.

Please try the attached patch.
Comment 15 Milan Plzik 2011-05-16 13:04:44 UTC
(In reply to comment #14)
> Created an attachment (id=46752) [details]
> little experiment
> 
> (In reply to comment #13)
> > After more thorough testing, it seems that r300 driver is not able to correctly
> > create surfaces of certain dimensions; random vram content is shown instead.
> 
> Not true. The r300 driver gets it right for all the other GPUs, it's just rs6xx
> that is broken.

  Sorry, I was generalizing too much; for me it's always in rs600 context.

> 
> Please try the attached patch.

I tried this patch; unfortunately it just reverted the old behavior -- problem with certain surface sizes was gone, but problem with texture alignment returned for both 8bpp and 32bpp textures. I did not notice any other differences.

  If you will have any other ideas/patches, I'll gladly test them; but I can't do much here by myself.
Comment 16 Marek Olšák 2011-05-16 16:23:27 UTC
Nope, I've run out of ideas and I don't have the GPU.

(Milan, are you near Brno by any chance?)
Comment 17 Milan Plzik 2011-05-17 03:01:25 UTC
(In reply to comment #16)
> Nope, I've run out of ideas and I don't have the GPU.
> 
> (Milan, are you near Brno by any chance?)

I'll contact you by e-mail and we'll see whether we can arrange a meeting.
Comment 18 ZeRo 2011-05-27 13:52:00 UTC
so any idea?
Comment 19 Milan Plzik 2011-05-28 12:50:57 UTC
After testing r300g driver (both with and withoug alignment fix) with different values for ColorTiling option, the results seems to be unaffected -- no matter whether the ColorTiling is enabled or disabled, I still get the original behavior (only affected by patch to alignment table).
Comment 20 Marek Olšák 2011-05-28 13:13:33 UTC
The ColorTiling option only affects the buffers allocated by the DDX, which is usually just the window framebuffer. The textures and private framebuffers allocated by r300g are usually tiled regardless of the ColorTiling option.

Setting this environment variable disables tiling in r300g:

RADEON_DEBUG=notiling

It must be set such that the Gnome Shell can see it, of course.
Comment 21 Milan Plzik 2011-05-29 23:40:31 UTC
(In reply to comment #20)
> Setting this environment variable disables tiling in r300g:
> 
> RADEON_DEBUG=notiling
> 
> It must be set such that the Gnome Shell can see it, of course.

  I tested gnome-shell with it; when using alignment table patches (Xorg's ColorTiling was always false), there was no change. However, when I reverted to original r300_texture_desc.c, things seem to work more-or-less correctly -- 8bpp textures seem to render fine (there's one case when I'm not sure), however, small 32bpp textures still render incorrectly.
Comment 22 Milan Plzik 2011-05-30 13:58:30 UTC
(In reply to comment #21)
>   I tested gnome-shell with it; when using alignment table patches (Xorg's
> ColorTiling was always false), there was no change. However, when I reverted to
> original r300_texture_desc.c, things seem to work more-or-less correctly --
> 8bpp textures seem to render fine (there's one case when I'm not sure),
> however, small 32bpp textures still render incorrectly.

UPDATE: looks like some fonts are not rendered properly either, but I can't justify whether they are rendered into 8bpp or 32bpp textures.
Comment 23 Tomasz P. 2013-01-11 21:54:38 UTC
Is it still a issue with current mesa and kernel ?
Comment 24 Madis Liias 2013-04-28 10:13:35 UTC
From the image it seems like the same rendering issue I am having:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/751828

My graphics card is ATI Radeon Xpress 1250

$ glxinfo | grep -i opengl
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RS600
OpenGL version string: 2.1 Mesa 9.1.1
OpenGL shading language version string: 1.20
Comment 25 Madis Liias 2013-04-28 10:40:53 UTC
Created attachment 78575 [details]
Same(?) text rendering issues as original reporter had
Comment 26 inbox-3VOAHXJJYNDO 2013-11-22 23:43:27 UTC
Affects me as well, OpenSuse 12.3 - Tumbleweed (kernel 3.7-3.11);
for my report and details (Samsung R60, hardly any different from people here) see http://phoronix.com/forums/showthread.php?89174-Radeon-Gnome-3-AMD-Xpress-1250-%28Samsung-R60%29-Driver-Glitches&p=374780

Also see https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/751828
Affects a LOT of people. :(((

I dump importance to medium-major, because its really distracting as it corrupts whole working area of gnome 3 / gnome shell (time, calender, system control (settings, power options))

With 3.11 kernel one gets a colorful triangle show, screen is tiled into four flashing triangle stips, after 3-4 seconds they vanish, but the font corruption stays same.

This bug might be linked with 35457
Comment 27 inbox-3VOAHXJJYNDO 2013-11-22 23:46:43 UTC
Yes, in 35457 in post 37 gnome-shell text corruption is exactly which I experience and is exactly same with screens in this bug. These two are the same critical bug.
Comment 28 inbox-3VOAHXJJYNDO 2013-11-24 06:49:20 UTC
This is definite duplicate of 35457 (compare screen attachments)

*** This bug has been marked as a duplicate of bug 35457 ***
Comment 29 Alex Deucher 2013-11-27 04:49:52 UTC
This is not a duplicate.
Comment 30 inbox-3VOAHXJJYNDO 2014-12-26 21:33:14 UTC
Still experiencing this with kernel 3.17-1 and latest Mesa from Manjaro.

Experiencing it even in Enlightment e17 (version e19) environiment, when hardware OpenGL compositing is selected. If I select software compositing, then this issue disappears.

Also, in KDE 4.14 I get random kernel hardlocks and freezes, I never had. I wonder if this issue is connected.
Comment 31 Simon 2015-03-30 14:04:25 UTC
I have a similar problem

My bug reports on other treckers and full information about my hardware:
https://bugzilla.gnome.org/show_bug.cgi?id=746160
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1434826
Comment 32 Alex Deucher 2016-02-10 14:04:33 UTC
*** Bug 89686 has been marked as a duplicate of this bug. ***
Comment 33 Andrew Randrianasulu 2016-02-11 01:14:29 UTC
I also have affected system and wanted for ages to see it fixed (with or without my help). unfortunately, even if I still can try and load old linux distro where last  working fglrx (proprietary driver) was working  - I have no idea what to do next  - even mmiotrace format apparently changed from 2.6.29 kernel era, and here i fear  some more tracing will be needed (and tools for userspace tracing also appear to bitrot or not even properly support this GPU).

i tried to appear on #radeon but everyone was busy there (I think this situation will continue more or less due to new bug flow, new hardware, new features, other users and developers also wanting various levels of help). may be setting special 'hackday' for this or other specific bugs will help? if you like the idea - please reply (I tend to read dri-devel and mesa-dev ML).

Thanks in advance!
Comment 34 Andrew Randrianasulu 2016-02-11 01:51:29 UTC
Created attachment 121662 [details]
chromium BSU also show this bug

using r300g driver from OpenGL version string: 2.1 Mesa 11.1.0-devel (git-8ae8fec), on kernel 4.2.0.
Comment 35 Andrew Randrianasulu 2016-02-11 01:55:40 UTC
Created attachment 121663 [details]
dmesg

as you can see this happens also on 32-bit kernel/32 bit userspace
Comment 36 Andrew Randrianasulu 2016-02-21 18:27:28 UTC
Created attachment 121870 [details]
mmiotrace from Catalyst 9.3 kernel 2.6.27.27
Comment 37 Alex Deucher 2016-02-23 02:11:45 UTC
*** Bug 92651 has been marked as a duplicate of this bug. ***
Comment 38 Andrew Randrianasulu 2016-02-28 13:53:18 UTC
Created attachment 122015 [details]
chromium BSU log with RADEON_DEBUG=texalloc

unfortunately, running with RADEON_DEBUG=notiling gives no visible improvements.
Comment 39 Andrew Randrianasulu 2016-02-28 13:56:32 UTC
Created attachment 122016 [details]
chromium BSU debug log with RADEON_DEBUG=texalloc,notiling
Comment 40 Alex Deucher 2016-02-29 14:09:00 UTC
(In reply to Andrew Randrianasulu from comment #38)
> unfortunately, running with RADEON_DEBUG=notiling gives no visible
> improvements.

You have to disable tiling in the ddx as well in the device section of you xorg config:
Option "ColorTiling" "false"
Comment 41 Micha 2016-06-06 04:33:43 UTC
Is there any hope that this will ever be fixed by someone?

Not even Kodi does work on the laptop - cannot verify if it is the same problem - but the osd while playback video looks the same (striped) way as the menubar of the Unity-desktop...think its the same problem.

There is almost nothing we can do with these laptops until someone will fix this!
Comment 42 Thierry Leconte 2017-02-15 18:27:02 UTC
Confirm that this bug is still present on up to date fedora25 :
kernel 4.9.8-201.fc25 
mesa 13.0.4

with X11 or wayland (no differences).
Only gnome-shell is affected. All others apps are ok.

same GPU as others :

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org R300 Project (0x1002)
    Device: ATI RS600 (0x7941)
    Version: 13.0.4
    Accelerated: yes
    Video memory: 256MB
    Unified memory: no
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RS600
OpenGL version string: 2.1 Mesa 13.0.4
OpenGL shading language version string: 1.20
Comment 43 Micha 2017-02-15 23:58:40 UTC
Same for Warzone2100 (and others?) on latest Mint Mate with Oibaf ppa, too. Still the same problems.
Comment 44 GitLab Migration User 2019-09-18 18:50:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/333.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.