New: Graphics corruption in Sauerbraten
http://bugs.freedesktop.org/show_bug.cgi?id=26043
Summary: Graphics corruption in Sauerbraten
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
URL: http://jon.severinsson.net/mesa/screenshot_10399.png
OS/Version: Linux (All)
Status: NEW
Keywords: patch, regression
Severity: normal
Priority: medium
Component: Drivers/DRI/R600
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=32638)
--> (http://bugs.freedesktop.org/attachment.cgi?id=32638)
Uggly patch that fixes the problem for me
After upgrading from Mesa 7.6.1 to Mesa 7.7 Sauerbraten would display severe graphics corruptions on screen making the game unplayable (see URL for a screenshot).
I recently had some time to spare and decided to try to hunt down the regression as an exercise in learning git, and managed to create the attached patch that solves the problem for me.
Please note that the patch isn't really a fix, more of a workaround, as it replaces 96 lines of new code with 206 lines of old code from the git history, rather than fixing the new code, but it works for me, and perhaps it can serve as a starting point for someone more knowledgeable to fix it for real.
The patch was originally created by going through git history between mesa_7_6_1 and mesa_7_7 looking for commits that broke something, and merging everything but those commits to a new tree. The commits I skipped was eea30906 614e8f22 fc38a3cf 45eb9d2f 5f7d5d3e 57864f6e 731810f8 and 66d6f9e8. I also had to do some manual conflict resolution when merging other commits. I then took the difference between mesa_7_7 and the new tree to create a patch that fixed Sauerbraten. Finally I cleaned up the patch and removed anything that wasn't necessary to get Sauerbraten working, giving me the attached patch.
lspci -v output for my card:
01:00.0 VGA compatible controller: ATI Technologies Inc RV630 [Radeon HD 2600 Series] (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Device 01bc
Flags: bus master, fast devsel, latency 0, IRQ 18
Memory at d0000000 (64-bit, prefetchable) [size=256M] Memory at fdfe0000 (64-bit, non-prefetchable) [size=64K] I/O ports at ee00 [size=256]
[virtual] Expansion ROM at fdf00000 [disabled] [size=128K]
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information <?> Kernel driver in use: radeon
Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev --
[Bug 26043] Graphics corruption in Sauerbraten
http://bugs.freedesktop.org/show_bug.cgi?id=26043
--- Comment #1 from Jon Severinsson <[email protected]> 2010-01-14 09:02:37 PST --- taiu told me at IRC that typing /floatvtx 1 in the Sauerbraten console also worked around the issue in mesa 7.7. It does work for Sauerbraten, but I've just verified that a few Wine games that didn't work for me with either mesa 7.6.1 nor 7.7 works after I apply my patch to 7.7, so the problem goes beyond just Sauerbraten.
Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev --
[Bug 26043] Graphics corruption in Sauerbraten
In reply to [email protected]http://bugs.freedesktop.org/show_bug.cgi?id=26043
Jon Severinsson <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #32638|0 |1
is obsolete| |
--- Comment #2 from Jon Severinsson <[email protected]> 2010-03-29 03:58:26 PST --- Created an attachment (id=34530)
--> (http://bugs.freedesktop.org/attachment.cgi?id=34530)
Somewhat less ugly patch for Mesa 7.8
When upgrading to mesa 7.8 I had to update my patch to get it to apply. I took the opportunity to see if I could clean up the patch while I was at it.
Essentially I tried to find what current code was the equivalent to the old code my patch re-introduced, and modify that instead.
The new patch is still no beauty, but much better than the old one and now weights at a somewhat more modest 372 lines (removing 97 lines and adding 77 lines)
Trying to analyse the changes I find three major ones, as well as some minor ones following from those, but as I'm no expert on Mesa I don't fully understand what impact they have, other than what I see on screen (Sauerbraten starting to work).
1) With the patch applied r700TryDrawPrims is called as a first stage of r600_pipeline instead of being called through the vbo_context(ctx)->draw_prims callback from the other stages.
2) In several places the patch replaces use of context->stream_desc with use of context->radeon.tcl.aos.
3) After doing the other changes, r700RunRenderPrimitiveImmediate have to use data from vb->Elts when calling R600_OUT_BATCH() or the graphic cards borks and requires a restart to output anything.
I hope this work will help someone more knowledgeable to figure out how to fix the problem properly.
Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --
[Bug 26043] Graphics corruption in Sauerbraten
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=26043
almos <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX--- Comment #3 from almos <[email protected]> 2011-11-13 09:05:37 PST --- I think this can be closed, since r600c is now deprecated. Also, sauerbraten renders correctly on my barts gpu with r600g of mesa 7.11. Feel free to reopen.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.