Bug 27507

Summary: [r300c] 0ad stuck while loading a game
Product: Mesa Reporter: Fabio Pedretti <pedretti.fabio>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: adres7
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/linux/+bug/557266
Whiteboard:
i915 platform: i915 features:
Attachments: Debug patch or scissor bug.

Description Fabio Pedretti 2010-04-07 01:19:49 UTC
I am getting this:
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.
when trying to start the game 0ad or douze map with sauerbraten (with shaders enabled).

dmesg shows this after 0ad crash:
[  204.087282] [drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for color buffer 0 (need 4190208 have 3145728) !
[  204.087294] [drm:r100_cs_track_check] *ERROR* [drm] color buffer 0 (1024 4 0 1023)
[  204.087300] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

and this with sauerbraten:
[ 1144.213905] radeon 0000:01:00.0: (PW 1) Vertex array 0 need 83826965 dwords have 112640 dwords
[ 1144.213915] [drm:r100_cs_track_check] *ERROR* Max indices 16765393
[ 1144.213921] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

I am using current mesa git with:
GL_RENDERER   = Mesa DRI R300 (RV530 71C5) 20090101 x86/MMX/SSE2 TCL DRI2
Comment 1 Pauli 2010-04-08 00:10:18 UTC
Created attachment 34797 [details]
Debug patch or scissor bug.

Here is 2 different error messages so 2 different bugs. It would be better if there was only one bug per report.

0ad problem is that mesa sets wrong height for rendering area (1023 instead 768). Could you apply the attached patch to mesa and run 0ad with RADEON_DEBUG=all ./0ad &> debug.log
Comment 2 Michel Dänzer 2010-04-08 01:26:10 UTC
*** Bug 27446 has been marked as a duplicate of this bug. ***
Comment 3 Fabio Pedretti 2010-04-08 01:44:33 UTC
> 0ad problem is that mesa sets wrong height for rendering area (1023 instead
> 768). Could you apply the attached patch to mesa and run 0ad with
> RADEON_DEBUG=all ./0ad &> debug.log

debug file created as requested with patch (note: compressed: 3MB, uncompressed: 152MB):
http://rapidshare.com/files/373364294/debug.log.bz2.html
Comment 5 Marek Olšák 2010-09-11 21:38:25 UTC
Could you possibly test this kernel patch:

http://lists.freedesktop.org/archives/dri-devel/2010-September/003830.html

And please let me know if it fixes 0ad for you.

You might also try the Gallium driver instead in case the patch doesn't help.
Comment 6 Fabio Pedretti 2010-09-13 03:04:26 UTC
(In reply to comment #5)
> Could you possibly test this kernel patch:
> 
> http://lists.freedesktop.org/archives/dri-devel/2010-September/003830.html
> 
> And please let me know if it fixes 0ad for you.
> 
> You might also try the Gallium driver instead in case the patch doesn't help.

It's still the same with the patch (applied against 2.6.34.6).

Note, however, that (with or without the patch) now the game stucks where previously crashed and I have to kill -9 it. There is nothing interesting in dmesg.

(r300g is working since a month)
Comment 7 Fabio Pedretti 2010-10-04 04:28:17 UTC
This is fixed now. Note however that with r300c unless you disable shadows the game runs at 20 second per frame. Works fast with r300g.

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.