[xorg-edgers] Texture corruption with Radeon gallium driver r300g and 'big' textures (xorg-edgers)

Bug #606907 reported by Gerwin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
mesa (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In some 3d applications like blender and ExtremeTux Racer, some textures are rendered wrong (screenshot attached, red circles). If the distance to the texture changes, the textures can be rendered correct again.
---
Architecture: amd64
DRM.card0.VGA.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1280x1024 1280x1024 1152x864 1024x768 1024x768 1024x768 832x624 800x600 800x600 800x600 800x600 640x480 640x480 640x480 640x480 720x400
 edid-base64: AP///////wBMLQsBNzFTRyIOAQNsIht4KjahollMlyQXUVa/74CBgHFPAQEBAQEBAQEBAQEBMCoAmFEAKkAwcBMAUg4RAAAeAAAA/QA4Sx5RDgAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBITUVYODEwODE2CiAgALY=
DistroRelease: Ubuntu 10.10
DkmsStatus:

InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
Package: mesa (not installed)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-8-generic root=UUID=27da138f-965b-4c93-91b9-1336661b582f ro quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-8.13-generic 2.6.35-rc5
Tags: maverick maverick
Uname: Linux 2.6.35-8-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 08/16/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1018.002
dmi.board.name: A8V Deluxe
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1018.002:bd08/16/2007:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASUSTeKComputerInc.:rnA8VDeluxe:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.
system:
 distro: Ubuntu
 codename: maverick
 architecture: x86_64
 kernel: 2.6.35-8-generic

Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
Gerwin (gerwin-kramer) wrote :

Forgot to add: This is only the case with the r300g driver (libgl1-mesa-dri-gallium), the normal ati driver has no problems with textures (using radeon 9800 pro on maverick)

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Gerwin,

        Thanks for including an image to demonstrate the issue. Also, please run the command 'apport-collect BUGNUMBER' which will attach additional files we need.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-xorglog
tags: added: needs-lspci-vvnn
Changed in mesa (Ubuntu):
status: New → Incomplete
Revision history for this message
Gerwin (gerwin-kramer) wrote : BootDmesg.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Gerwin (gerwin-kramer) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : DRM.card0.DVI.I.1.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : DRM.card0.SVIDEO.1.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : GdmLog.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : GdmLog1.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : GdmLog2.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : Lspci.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : Lsusb.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : PciDisplay.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : ProcModules.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : RelatedPackageVersions.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : UdevDb.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : UdevLog.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : XorgLog.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : XorgLogOld.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : Xrandr.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : glxinfo.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : monitors.xml.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : setxkbmap.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : xdpyinfo.txt

apport information

Revision history for this message
Gerwin (gerwin-kramer) wrote : xkbcomp.txt

apport information

Bryce Harrington (bryce)
tags: removed: needs-xorglog
tags: removed: needs-lspci-vvnn
Changed in mesa (Ubuntu):
status: Incomplete → Confirmed
Bryce Harrington (bryce)
tags: added: maverick
summary: - Radeon gallium driver r300g renders textures wrong
+ [xorg-edgers] Radeon gallium driver r300g renders textures wrong
Bryce Harrington (bryce)
tags: added: edgers
Revision history for this message
Oibaf (oibaf) wrote : Re: [xorg-edgers] Radeon gallium driver r300g renders textures wrong

Does this still happen with newer r300g?

Revision history for this message
Gerwin (gerwin-kramer) wrote :

Unfortunately, yes. (everything updated with xorg edgers ppa, so also newer r300g)

r300c is okay, just as in windows, so it should not be my card. If i am the only one, maybe a bios AGP setting? But still, if the classic driver is okay...

The corrupted texture problem is easy noticeable if i start Extreme Tux Racer, the mouse pointer looks scrambled.

But it is not only Tuxracer, blender has the problem, and octagaplayer and other 3d apps as well.

Revision history for this message
Gerwin (gerwin-kramer) wrote :

just to make sure, I had all kinds of AGP settings combinations in the BIOS, but it did not make a difference.

Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
Gerwin (gerwin-kramer) wrote :

I think it is a distance thing, if i am close to the texture, it is okay, but if i am far away, it is corrupted.

(see the attached images above).

Revision history for this message
Gerwin (gerwin-kramer) wrote :

I found that if i set the texture quality of open arena to low, i don't have the problem. So the problem is only there with 'big' textures. In other 3d applications it is not always possible to set this texture quality so the problem is still there.

Revision history for this message
Gerwin (gerwin-kramer) wrote :

sorry, with texture quality I mean texture detail (the size of the texture)

tags: added: ati corruption r300g texture
Gerwin (gerwin-kramer)
summary: - [xorg-edgers] Radeon gallium driver r300g renders textures wrong
+ [xorg-edgers] Texture corruption with Radeon gallium driver r300g and
+ 'big' textures
Gerwin (gerwin-kramer)
summary: [xorg-edgers] Texture corruption with Radeon gallium driver r300g and
- 'big' textures
+ 'big' textures (xorg-edgers)
tags: added: xorg-edgers
Revision history for this message
Oibaf (oibaf) wrote :

Could you check if your bug looks like one of the following upstream reported bug?
https://bugs.freedesktop.org/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=Drivers%2FGallium%2Fr300&product=Mesa

If not and if you are using and old kernel try using a recent (>= 2.6.35) kernel from here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D

If the bug still appears with the newer kernel please open a new bug using:
https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa

r300g developers are quite fast at fixing bugs when reported upstream.

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

Created an attachment (id=38848)
This texture is corrupted

In several 3d applications some textures are rendered wrong. If the distance to the texture changes, the textures can be rendered correct again.

In OpenArena the textures are not or rarely distorted when the 'texture detail' setting is at it's lowest. At the highest setting, several textures are distorted. If i move away or towards to the texture, the texture can be rendered correct again.

The bug is similar to https://bugs.freedesktop.org/show_bug.cgi?id=28800 , but with some differences:

- This bug wasn't there with r300c
- It is with several apps i tested, Extreme Tux Racer, Octagaplayer, Blender, OpenArena.
- I don't know if the WoW bug has the distance and texture detail thing.

I'm using

- ubuntu maverick with the
- xorg edgers ppa,
- so, gallium r300g driver
- kernel 2.6.35-22
- R350 agp ati radeon 9800 pro card.

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

Created an attachment (id=38849)
Now it is okay

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

Created an attachment (id=38850)
The bug in Extreme Tux Racer (also the mouse pointer in the menu is corrupted)

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

Created an attachment (id=38851)
Bug in blender

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

Created an attachment (id=38852)
Bug in Blender 2

Revision history for this message
Gerwin (gerwin-kramer) wrote :

the bug looks a bit like https://bugs.freedesktop.org/show_bug.cgi?id=28800

i'll add the bug there

I am using the 2.6.35.22 kernel

Revision history for this message
Gerwin (gerwin-kramer) wrote :
Revision history for this message
In , Marek Olšák (maraeo) wrote :

This looks like a tiling issue and r300c doesn't implement tiling fully. I can't reproduce it on R500. Try to set the environment variable RADEON_DEBUG=notiling and please let me know if it fixes the issue.

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

(In reply to comment #5)
> This looks like a tiling issue and r300c doesn't implement tiling fully. I
> can't reproduce it on R500. Try to set the environment variable
> RADEON_DEBUG=notiling and please let me know if it fixes the issue.

Yes, RADEON_DEBUG=notiling fixes the issue!

Revision history for this message
In , Marek Olšák (maraeo) wrote :

Created an attachment (id=38951)
possible fix

Could you please try this patch?

And please attach you glxinfo of r300c (I'd like to know the PCI ID, which is in the renderer string).

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

(In reply to comment #7)
> Created an attachment (id=38951) [details]
> possible fix
>
> Could you please try this patch?
>
> And please attach you glxinfo of r300c (I'd like to know the PCI ID, which is
> in the renderer string).

Renderer string of r300c:

OpenGL renderer string: Mesa DRI R300 (R350 4E48) 20090101 TCL DRI2

I don't have the source of the driver (I am using this r300g driver from the xorg-edgers ppa)

I can download the source from this ppa, patch and build it, but I am not experienced with building this driver so then I would need detailed instructions...

Revision history for this message
In , Marek Olšák (maraeo) wrote :

See: https://bugs.freedesktop.org/show_bug.cgi?id=29066#c10

After git clone, apply the patch using: git am < patch
Also skip the "ln" command.

Revision history for this message
In , Gerwin (gerwin-kramer) wrote :

(In reply to comment #9)
> See: https://bugs.freedesktop.org/show_bug.cgi?id=29066#c10
>
> After git clone, apply the patch using: git am < patch
> Also skip the "ln" command.

The patch worked!

I did:

git clone git://anongit.freedesktop.org/git/mesa/mesa
git am < 0001-r300g-attempt-to-fix-tiling-on-R350.patch
./autogen.sh
make

made a backup of the old gallium driver, copied the new one using

sudo cp lib/gallium/*_dri.so /usr/lib/dri/

Double checked it by putting the backup back and the issue was back, putting the new one back and the issue was gone, so the patch worked, thanks!

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

(In reply to comment #5)
> This looks like a tiling issue and r300c doesn't implement tiling fully. I
> can't reproduce it on R500. Try to set the environment variable
> RADEON_DEBUG=notiling and please let me know if it fixes the issue.

I have the same issue and RADEON_DEBUG=notiling variable helps here, too.
Tested on Nexuiz.

kernel: linux-image-2.6.35-22-generic (2.6.35-22.33)
xorg: 7.5+6ubuntu3
xserver-xorg-core: 2:1.9.0-0ubuntu7
mesa: 7.10.0~git20100925+gallium+r300.58c24390-0ubuntu0tormod
graphic card: Sapphire Radeon 9600 256MB AGP (RV350)

OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on RV350
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV350 AP [Radeon 9600] [1002:4150]
01:00.1 Display controller [0380]: ATI Technologies Inc RV350 AP [Radeon 9600] (Secondary) [1002:4170]

I've got RV370 card, too but now I was not able to test if it's got the same issue:
02:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] [1002:5b60]
02:00.1 Display controller [0380]: ATI Technologies Inc RV370 [Radeon X300SE] [1002:5b70]

And I've got one more problem with r300g - at the same (custom low) settings I've had for about 50% more FPS on r300c than on r300g in most places (for example 20FPS to 30FPS on many map objects on the screen) but when I enable GLSL in Nexuiz on r300g I have many more FPS, even than in r300c (40-50FPS in the same places) but then I have other graphic issue. I thought it is something connected with this issue but for it RADEON_DEBUG=notiling doesn't help.
The issue with GLSL looks like some textures are flashing (once there are visible (drawn properly) and once not visible at all (only grey color (maybe other colors, too) in the place of texture). It's flashing very quickly and cannot be seen on screenshots (I've done almost 100 of them).
Searching bug reports I've saw only this:
https://bugs.freedesktop.org/show_bug.cgi?id=23545 and
https://bugs.freedesktop.org/show_bug.cgi?id=25027
which reading from the description it looks the same.

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

> The issue with GLSL looks like some textures are flashing (once there are
> visible (drawn properly) and once not visible at all (only grey color (maybe
> other colors, too) in the place of texture).

Now, I've tested other maps in Nexuiz and I see that where the textures are flashing there are not some colors but textures dissappear and I see through the walls even the sky in closed places. It can be seen in game menu, too where 'Settings', 'About' and 'Quit' menus are flashing.
Shoud I write a new bug report or comment somewhere in the other bug reports?

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

> Now, I've tested other maps in Nexuiz and I see that where the textures are
> flashing there are not some colors but textures dissappear and I see through
> the walls even the sky in closed places. It can be seen in game menu, too where
> 'Settings', 'About' and 'Quit' menus are flashing.
> Shoud I write a new bug report or comment somewhere in the other bug reports?

Sorry for so many comments but...
Now I've found the same issue with Blur effect in KDE 4.5.1 on Kubuntu 10.10 - textures are dissapearing and showing again and when I disable Blur and set other effects to default desktop, panel and windows are visible.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

I can confirm this bug is still present on today's Kubuntu 10.10 iso from http://cdimage.ubuntu.com/kubuntu/daily-live/current/maverick-desktop-i386.iso 25-Sep-2010 06:48 688M Desktop CD for PC (Intel x86) computers (standard download) with it's stock 2.6.35 kernel and adding only ppa:xorg-edgers/radeon (https://edge.launchpad.net/~xorg-edgers/+archive/radeon) repository (mesa 7.10.0~git20100925+gallium+r300.58c24390-0ubuntu0tormod).
The game tested is Nexuiz.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

I've forgot to say, the mesa is from xorg-edgers/radeon Lucid repository on Maverick (there's no Mesa with r300g for Maverick, yet(?)).

Revision history for this message
Gerwin (gerwin-kramer) wrote :

I reposted this bug on https://bugs.freedesktop.org/show_bug.cgi?id=30313,

Marek Olšák posted a patch that worked for me. It was a tiling issue (i posted the patch here too).

Revision history for this message
Gerwin (gerwin-kramer) wrote :

To check if it is a tiling issue with you as well:

1. open terminal
2. enter: export RADEON_DEBUG=notiling
3. enter command to game (i think nexuiz)

Is the issue fixed in nexuiz?

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Thanks Gerwin!
Yes, it's tiling issue for which RADEON_DEBUG=notiling variable helps.

Revision history for this message
In , Marek Olšák (maraeo) wrote :

Tomasz>

RADEON_DEBUG=notiling may have some side effects and may even change behavior of other bugs. That patch was just a guess of mine. But you have an RV350 GPU so the patch won't help you, it only makes R350 be considered as RV350-based with regard to tiling.

Please file separate bugs for your issues. I consider this issue fixed and am waiting for a clarification on why R350 behaves like that, and then I'll close the bug.

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

> RADEON_DEBUG=notiling may have some side effects and may even change behavior
> of other bugs. That patch was just a guess of mine. But you have an RV350 GPU
> so the patch won't help you, it only makes R350 be considered as RV350-based
> with regard to tiling.

But RADEON_DEBUG=notiling does help without GLSL. With this option Nexuiz renders everything properly on my settings. Without this option on RV350 I have textures corruption like Gerwin on R300 so there's a problem with tiling on my RV350 with r300g. I haven't noticed any other side effects of this environment variable, yet but I haven't done much testing. The textures disappearing problem looks the same with this variable set or without it when I enable GLSL in Nexuiz and in Blur with KDE 4.5.1.

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38963)
Corrupted textures in Nexuiz on RV350

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38964)
Corrupted textures in Nexuiz on RV350 #2

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38965)
Corrupted textures in Nexuiz on RV350 #3

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38966)
Corrupted textures in Nexuiz on RV350 #4

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38967)
Corrupted textures in Nexuiz on RV350 #5 (one place)

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38968)
Corrupted textures in Nexuiz on RV350 #6 (one place)

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38969)
Graphics setings in Nexuiz on RV350 #1

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

Created an attachment (id=38970)
Graphics setings in Nexuiz on RV350 #2

Revision history for this message
In , Tomasz Czapiewski (xeros) wrote :

After looking more at screenshots I'm thinking it's rather shading (lightning(?)) problem on textures than textures corruption but as I've said before, setting "RADEON_DEBUG=notiling" fixes the problem here, too.

Revision history for this message
In , Marek Olšák (maraeo) wrote :

The patch has been committed to master. Closing..

Revision history for this message
In , Marek Olšák (maraeo) wrote :

Thomasz,

your issue seems to be similar to bug 28800. I guess Nexuiz uses some auxiliary textures to compute lighting.

Revision history for this message
Oibaf (oibaf) wrote :

Is this confirmed fixed in current xorg-edgers packages? If yes set to 'Fix Released' the mesa (Ubuntu) package.

Gerwin (gerwin-kramer)
Changed in mesa (Ubuntu):
status: Confirmed → Fix Released
Changed in mesa:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in mesa:
importance: Medium → Unknown
Changed in mesa:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.