https://bugs.freedesktop.org/show_bug.cgi?id=28459
Summary: [r300g] Heroes of Newerth slow and corrupted with libtxc_dxtn.so Product: Mesa Version: git Platform: Other OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/r300 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: drakkk@centrum.cz
I wanted to try compressed texture support with r300g so I installed libtxc_dxtn.so and I got some nice improvements (for example in Neverwinter Nights textures looks many times better). However in Heroes of Newerth (HoN) there is big slowdown in menu and while in game it is so slow it almost looks like frozen and there is massive corruption.
Terminal output: radeon: Bad CS, dumping... VENDORID:DEVICEID 0x1002:0x71C5 0x00001007 0x00000004 ... tons of similar hexadecimal output
Dmesg shows this: [drm:r100_cs_track_texture_check] *ERROR* Texture of unit 0 needs 8320 bytes but is 4096 [drm:r100_cs_track_texture_print] *ERROR* pitch 1 [drm:r100_cs_track_texture_print] *ERROR* use_pitch 0 [drm:r100_cs_track_texture_print] *ERROR* width 1 [drm:r100_cs_track_texture_print] *ERROR* width_11 0 [drm:r100_cs_track_texture_print] *ERROR* height 128 [drm:r100_cs_track_texture_print] *ERROR* height_11 0 [drm:r100_cs_track_texture_print] *ERROR* num levels 7 [drm:r100_cs_track_texture_print] *ERROR* depth 0 [drm:r100_cs_track_texture_print] *ERROR* bpp 4 [drm:r100_cs_track_texture_print] *ERROR* coordinate type 0 [drm:r100_cs_track_texture_print] *ERROR* width round to power of 2 0 [drm:r100_cs_track_texture_print] *ERROR* height round to power of 2 0 [drm:r100_cs_track_texture_print] *ERROR* compress format 2 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
mesa: ebd98b3496d750a6595382e75267361d2b1e47e2 kernel: 2.6.33.5-112.fc13 GPU: ATI Technologies Inc M56P [Radeon Mobility X1600] (RV530)
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #1 from Roland Scheidegger sroland@vmware.com 2010-06-09 07:26:17 PDT --- (In reply to comment #0)
I wanted to try compressed texture support with r300g so I installed libtxc_dxtn.so and I got some nice improvements (for example in Neverwinter Nights textures looks many times better). However in Heroes of Newerth (HoN) there is big slowdown in menu and while in game it is so slow it almost looks like frozen and there is massive corruption.
might be bug in the drm checker.
[drm:r100_cs_track_texture_print] *ERROR* bpp 4 [drm:r100_cs_track_texture_print] *ERROR* compress format 2
Dunno how that would happen, but compressed textures should always show up with a bpp of 1 (with 4 the calculated size will be 4 times as big as needed). I know there were some bugs wrt compressed textures in that area, but pretty sure it should be fixed in 2.6.33...
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #2 from Pavel Ondračka drakkk@centrum.cz 2010-06-09 07:30:11 PDT --- Should I try some newer kernel?
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #3 from Marek Olšák maraeo@gmail.com 2010-06-09 07:54:13 PDT --- Yes, please give it a try.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #4 from Pavel Ondračka drakkk@centrum.cz 2010-06-09 07:58:18 PDT --- Which one, 2.6.34 or 2.6.35-rc2?
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #5 from Marek Olšák maraeo@gmail.com 2010-06-09 08:55:38 PDT --- Either this:
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-linus
or 2.6.34 or any later version.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #6 from Pavel Ondračka drakkk@centrum.cz 2010-06-10 04:01:41 PDT --- Sadly, this bug is present also with kernel 2.6.35-rc2. Do you need any more info or logs?
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #7 from Roland Scheidegger sroland@vmware.com 2010-06-10 05:17:58 PDT --- I think an explanation could be that there are two packets for the same texture unit in the command stream - if the first one is compressed, it would set cpp to 1 and set the compress bits, but if the second one is uncompressed it would set cpp according to format but the compress bits would stay as it's only written if the format is compressed.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #8 from Roland Scheidegger sroland@vmware.com 2010-06-11 05:35:00 PDT --- Created an attachment (id=36214) View: https://bugs.freedesktop.org/attachment.cgi?id=36214 Review: https://bugs.freedesktop.org/review?bug=28459&attachment=36214
possible fix
If my theory is right, the attached patch might help (that's just a quick try, r100/r200 would need the same).
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #9 from Fabio Pedretti fabio.ped@libero.it 2010-06-11 09:01:00 PDT --- (In reply to comment #8)
Created an attachment (id=36214)
View: https://bugs.freedesktop.org/attachment.cgi?id=36214 Review: https://bugs.freedesktop.org/review?bug=28459&attachment=36214
possible fix
If my theory is right, the attached patch might help (that's just a quick try, r100/r200 would need the same).
I was having the same crash problem with sauerbraten game (bug #27756) and this patch seems to fix it (tested with linux 2.6.34). When submitting the patch could you push it also to linux stable branch 2.6.32/33/34?
There are still 2 similar bugs that would be nice to have fixed: bug #27755 and bug #27507.
Thanks.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
Fabio Pedretti fabio.ped@libero.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fabio.ped@libero.it
--- Comment #10 from Fabio Pedretti fabio.ped@libero.it 2010-06-11 09:01:12 PDT --- *** Bug 27756 has been marked as a duplicate of this bug. ***
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #11 from Pavel Ondračka drakkk@centrum.cz 2010-06-11 12:07:10 PDT --- Thank you Roland, with your patch Heroes of Newerth works fine again. This bug can be closed after your patch is committed.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #12 from Alex Deucher agd5f@yahoo.com 2010-06-11 15:55:20 PDT --- Created an attachment (id=36226) View: https://bugs.freedesktop.org/attachment.cgi?id=36226 Review: https://bugs.freedesktop.org/review?bug=28459&attachment=36226
fix r1xx/r2xx/r3xx
This patch combines Roland's patch with the same fixes for r1xx and r2xx. Roland, if you want to sign off on it, I'll send it to Dave.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #13 from Roland Scheidegger sroland@vmware.com 2010-06-12 06:57:13 PDT --- Review of attachment 36226: --> (https://bugs.freedesktop.org/review?bug=28459&attachment=36226)
Signed-off-by: Roland Scheidegger sroland@vmware.com
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #14 from Alex Deucher agd5f@yahoo.com 2010-06-12 09:13:01 PDT --- Sent to Dave.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
Marek Olšák maraeo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from Marek Olšák maraeo@gmail.com 2010-06-21 14:05:06 PDT --- The patch has been committed to: git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-fixes And should appear in the next kernel. Closing,
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #16 from madbiologist s.j.turner@uq.net.au 2010-07-06 20:32:30 PDT --- This patch has been included in kernel 2.6.35-rc4.
https://bugs.freedesktop.org/show_bug.cgi?id=28459
--- Comment #17 from Fabio Pedretti fabio.ped@libero.it 2010-08-02 23:59:18 PDT --- This is also fixed in 2.6.34.2.
dri-devel@lists.freedesktop.org