Bug 24593 - S3TC compression doesn't work on KMS enabled kernels with R300 (RV530 71C1)
Summary: S3TC compression doesn't work on KMS enabled kernels with R300 (RV530 71C1)
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 12:35 UTC by Krzysztof A. Sobiecki
Modified: 2009-12-19 12:41 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Output from glxinfo (15.59 KB, text/x-log)
2009-10-17 12:35 UTC, Krzysztof A. Sobiecki
no flags Details
My .drirc (1.08 KB, text/plain)
2009-10-17 12:38 UTC, Krzysztof A. Sobiecki
no flags Details
Info from mesa with debug. (1.23 KB, text/x-log)
2009-10-17 12:48 UTC, Krzysztof A. Sobiecki
no flags Details

Description Krzysztof A. Sobiecki 2009-10-17 12:35:47 UTC
Created attachment 30506 [details]
Output from glxinfo

While using this software:
drm-next:f059d2ad69b056aeabad4460f706a3df2f77ce50
mesa:166957abebea6aa203eba7e6348e89d53cf0e13e
libdrm:3a387a983ec40cd443e22c1f8d9a6b5b5a8fa0d1
With enabled KMS.

progs/tests/texcompsub
GL_VERSION = 1.5 Mesa 7.7-devel
GL_RENDERER = Mesa DRI R300 (RV530 71C1) 20090101  TCL DRI2
11 supported compression formats: 0x83f0 0x83f2 0x83f3 0x83a0 0x83a1 0x83a2 0x83a3 0x8c4c 0x8c4d 0x8c4e 0x8c4f 
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

Dmesg output:
[70317.576693] [drm:r100_cs_track_texture_check] *ERROR* Texture of unit 0 needs 524288 bytes but is 131072
[70317.576698] [drm:r100_cs_track_texture_print] *ERROR* pitch                      1
[70317.576701] [drm:r100_cs_track_texture_print] *ERROR* width                      512
[70317.576703] [drm:r100_cs_track_texture_print] *ERROR* height                     512
[70317.576705] [drm:r100_cs_track_texture_print] *ERROR* num levels                 0
[70317.576707] [drm:r100_cs_track_texture_print] *ERROR* depth                      0
[70317.576709] [drm:r100_cs_track_texture_print] *ERROR* bpp                        2
[70317.576711] [drm:r100_cs_track_texture_print] *ERROR* coordinate type            0
[70317.576713] [drm:r100_cs_track_texture_print] *ERROR* width round to power of 2  1
[70317.576715] [drm:r100_cs_track_texture_print] *ERROR* height round to power of 2 1
[70317.576717] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

progs/tests/texcompress2
GL_VERSION = 1.5 Mesa 7.7-devel
GL_RENDERER = Mesa DRI R300 (RV530 71C1) 20090101  TCL DRI2
11 supported compression formats: 0x83f0 0x83f2 0x83f3 0x83a0 0x83a1 0x83a2 0x83a3 0x8c4c 0x8c4d 0x8c4e 0x8c4f 
Image is 512 x 512
Compressed Internal Format: other (0x83f3)
Original size:   786432 bytes
Compressed size: 262144 bytes
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

Dmesg output:
[70786.595152] [drm:r100_cs_track_texture_check] *ERROR* Texture of unit 0 needs 1048576 bytes but is 262144
[70786.595157] [drm:r100_cs_track_texture_print] *ERROR* pitch                      1
[70786.595160] [drm:r100_cs_track_texture_print] *ERROR* width                      512
[70786.595162] [drm:r100_cs_track_texture_print] *ERROR* height                     512
[70786.595164] [drm:r100_cs_track_texture_print] *ERROR* num levels                 0
[70786.595166] [drm:r100_cs_track_texture_print] *ERROR* depth                      0
[70786.595168] [drm:r100_cs_track_texture_print] *ERROR* bpp                        4
[70786.595170] [drm:r100_cs_track_texture_print] *ERROR* coordinate type            0
[70786.595172] [drm:r100_cs_track_texture_print] *ERROR* width round to power of 2  1
[70786.595174] [drm:r100_cs_track_texture_print] *ERROR* height round to power of 2 1
[70786.595176] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

It also causes problems with NWN, On the Rain-Slick Precipice of Darkness, Episode One and Two.

Debug info with drm debug=1 if needed.
Comment 1 Krzysztof A. Sobiecki 2009-10-17 12:38:39 UTC
Created attachment 30507 [details]
My .drirc
Comment 2 Krzysztof A. Sobiecki 2009-10-17 12:48:07 UTC
Created attachment 30508 [details]
Info from mesa with debug.
Comment 3 Maciej Cencora 2009-10-17 13:07:11 UTC
The problem is in the radeon drm module. It doesn't account the compressed texture sizes correctly.
Comment 4 Krzysztof A. Sobiecki 2009-10-17 13:24:40 UTC
I have just assumed that Mesa produces buggy textures. Silly me.
Comment 5 Fabio Pedretti 2009-12-18 00:49:44 UTC
This should be fixed in 2.6.33-rc1 and later, which include this commit:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=d785d78bbdb53580b12c40e820af5a3281ce2fc8
Comment 6 Krzysztof A. Sobiecki 2009-12-19 12:41:51 UTC
Yes it fixed bug. I will close it for now. If it's not true, please reopen it.


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.