Bug 22741 - RV530 lockups with sauerbraten game
Summary: RV530 lockups with sauerbraten game
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Maciej Cencora
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 00:48 UTC by Fabio Pedretti
Modified: 2009-10-09 02:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fallback to software rendering if we run out of free texcoords (1.48 KB, patch)
2009-09-19 03:58 UTC, Maciej Cencora
Details | Splinter Review
fix v2 (1.48 KB, patch)
2009-09-19 09:45 UTC, Maciej Cencora
Details | Splinter Review

Description Fabio Pedretti 2009-07-13 00:48:25 UTC
I noticed lockups with the sauerbraten when there are some explosions in the game.

I am using 2009-07-13 mesa master git (up to bb4c703587) under a RV530 with no
KMS, compiled without libdrm_radeon:
GL_RENDERER   = Mesa DRI R300 (RV530 71C5) 20090101 x86/MMX/SSE2 TCL

To get the lockups "dynamic light on and set to high quality" is required but not sufficient. Specifically I am getting the lockups with these GFX options:
shaders on -> high detail
water -> refr/refl:off - caustics: on
waterfalls -> refr/refl: off
soft shadow: off
stencil shadow: on
glare: off
grass: on
dynamic light on -> high quality
soft explosion -> low quality
water/lave vert anim: on
glass reflect: on
decals: on
fix tjoints: on
textures -> low quality
modesl: all on
animation: high quality

The easiest way to trigger the lockup is:
1) singleplayer -> Start Private Stan Sauer
2) Run and Gun Part II
3) go up the stairs, pull the lever, kill one or two monsters on that room, pull another lever on the left, enter the room
4) shoot the cans inside that room -> lockup
Comment 1 Fabio Pedretti 2009-07-13 01:05:33 UTC
I forgot to add that I am using sauerbraten 20080620 that comes with Ubuntu 9.04. I still can ssh into the system: the game uses 100% CPU; I can kill the game but then Xorg uses 100% CPU and I can't kill it.
Comment 2 Adam Jackson 2009-08-24 12:32:48 UTC
Mass version move, cvs -> git
Comment 3 Maciej Cencora 2009-09-19 03:44:49 UTC
The problem is that we run out of free texture coords to do the fog.
Proper solution is known (stuff texcoord and fogcoord in one vertex attribute) but implementation isn't trivial. As a temporary solution we should probably fall back to software rendering.
Comment 4 Maciej Cencora 2009-09-19 03:58:58 UTC
Created attachment 29697 [details] [review]
fallback to software rendering if we run out of free texcoords

Could you try this patch?
Comment 5 Maciej Cencora 2009-09-19 09:45:03 UTC
Created attachment 29700 [details] [review]
fix v2

there was a typo in previous patch. try this one.
Comment 6 Fabio Pedretti 2009-09-22 01:08:53 UTC
(In reply to comment #5)
> Created an attachment (id=29700) [details]
> fix v2
> 
> there was a typo in previous patch. try this one.
> 

I wanted to test the patch, but actually that map (with or without the patch applied) is visually corrupted and show these warnings:

bo(0x1302cfb8, 65536) is mapped (-1) can't valide it.
validated 0x1302cfb8 [0x81034000, 0x85034000]
bo(0x1302cfb8, 65536) is mapped (-1) can't valide it.
validated 0x1302cfb8 [0x81034000, 0x85034000]
[...]
*********************************WARN_ONCE*********************************
File radeon_dma.c function radeonReleaseDmaRegions line 348
Leaking dma buffer object!
***************************************************************************
bo(0x1302cfb8, 65536) is mapped (-6) can't valide it.
validated 0x1302cfb8 [0x838B4000, 0x838B6000]
[...]

This problem started with http://cgit.freedesktop.org/mesa/mesa/commit/?id=284a7af274bc148f112bd0ebb40583923ee26b49 , however before that I had a segfault that first appeared with http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f9dbe773953b024075910b3bec11ebc96c2e8e0 .

There is a patch for that at http://marc.info/?l=mesa3d-dev&m=125354446011979&w=2 but it makes sauerbraten segfault with:
http://pastebin.com/m5a27e675
Comment 7 Fabio Pedretti 2009-09-22 08:40:38 UTC
(In reply to comment #5)
> Created an attachment (id=29700) [details]
> fix v2
> 
> there was a typo in previous patch. try this one.
> 

I also tested the 7.6 branch. Without the patch the lockups is now gone, but instead of it I get this:

*********************************WARN_ONCE*********************************
File r300_state.c function r500SetupRSUnit line 1596
Don't know how to satisfy InputsRead=0x00000001
***************************************************************************

After applying the patch to the 7.6 branch that warning also disappears. However the patch make the explosion very very slow.
Comment 8 Maciej Cencora 2009-09-23 12:02:17 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > Created an attachment (id=29700) [details] [details]
> > fix v2
> > 
> > there was a typo in previous patch. try this one.
> > 
> 
> I also tested the 7.6 branch. Without the patch the lockups is now gone, but
> instead of it I get this:
> 
> *********************************WARN_ONCE*********************************
> File r300_state.c function r500SetupRSUnit line 1596
> Don't know how to satisfy InputsRead=0x00000001
> ***************************************************************************
> 
> After applying the patch to the 7.6 branch that warning also disappears.
> However the patch make the explosion very very slow.
> 

The slowdown is to be expected, because the driver is falling back to software rendering. I'm going to push this patch for both branches.
Comment 9 Maciej Cencora 2009-09-23 14:26:15 UTC
Fix committed. Closing.
Comment 10 Fabio Pedretti 2009-10-09 02:16:55 UTC
> I wanted to test the patch, but actually that map (with or without the patch
> applied) is visually corrupted and show these warnings:

Note that this issue appeared in master after 7.6 is now also fixed.


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.