https://bugs.freedesktop.org/show_bug.cgi?id=32888
Summary: [r600g] GL_EXT_texture_compression_s3tc support Product: Mesa Version: git Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: enhancement Priority: medium Component: Drivers/Gallium/r600 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: vlee@vmware.com
mesa: 6d9ca78ef7bf831b9b63f4bda68623cbae627508 (master)
r600g currently does not support the OpenGL extension GL_EXT_texture_compression_s3tc, whereas r600 classic does. Gallium drivers softpipe, llvmpipe, and r300g currently also support GL_EXT_texture_compression_s3tc.
GL_EXT_texture_compression_s3tc is a necessary extension for VMware Workstation and VMware Player to support hardware graphics acceleration in Windows guest operating systems.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #1 from Tobias Jakobi liquid.acid@gmx.net 2011-02-01 13:57:45 PST --- wine also kind of requires this extension, since s3tc is mandatory for Direct3D translation inside the wined3d layer.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #2 from Tobias Jakobi liquid.acid@gmx.net 2011-02-06 07:50:48 PST --- I just noticed that there is the R600_ENABLE_S3TC option and tried to enable it.
However this triggers the CS checker in the kernel and reject most of the commands. Tried with Max Payne 2 and FEAR, since I know that these two use texture compression when available (MP2 even in the menu): 1) MP2 just displays a black screen 2) FEAR works in the menu, but crashes when going ingame
In both cases I get an error from r600_check_texture_resource (r600_cs.c), which comes from r600_bpe_from_format not knowing the FMT_BCx formas.
The format code was introduced in this commit: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2c55547dc36f404e29dbc92531...
The corresponding debug option here: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6baad55f157387d0bb44144680a...
I dunno how this should have ever worked, when the kernel immediately rejects these formats?
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #3 from Tobias Jakobi liquid.acid@gmx.net 2011-02-06 08:14:04 PST --- More spam:
I found this interesting thread in the Phoronix forums: http://phoronix.com/forums/showthread.php?25679-S3TC-gt-r600-c-g/page7
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #4 from Tobias Jakobi liquid.acid@gmx.net 2011-02-09 02:39:22 PST --- Created an attachment (id=43156) View: https://bugs.freedesktop.org/attachment.cgi?id=43156 Review: https://bugs.freedesktop.org/review?bug=32888&attachment=43156
Disable CS check for textures
To quote Keith: Seems to sort-of work for non-mipmapped textures.
Tested with quake4 (where s3tc is mandatory) and FEAR. Like expected all mipmap levels are broken, which results in funny colors. Use GL_LINEAR as r_texturemode in quake-based engines to get an idea how it could look like :)
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #5 from Tobias Jakobi liquid.acid@gmx.net 2011-02-15 02:08:05 PST --- Results with: (i) new git master (including Dave's recent patches) (ii) CS texture checking disabled (iii) R600_ENABLE_S3TC=1
1) quake4 works flawlessly now, even with R600_FORCE_TILING=1 2) Max Payne 2 (through wine), where s3tc support is mandatory, also works. Both tested in menu and ingame. Enabling R600_FORCE_TILING doesn't show any obvious artifacts. 3) FEAR is still triggering GPU resets once you get ingame. However this doesn't have to be related to texture compression support. At least some textures are now visible, shortly before the driver resets the GPU.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #6 from Tobias Jakobi liquid.acid@gmx.net 2011-02-17 00:06:55 PST --- Retested with the latest d-r-t and at at least on my RV740 the new CS checker code seems to do the job right.
@Dave: Would it be safe now to also advertise the remaining two BC formats in r600g? The BC4 and BC5 one? Also, is it intended that the s3tc_to_blittable (and the reset function) take a level parameter, which isn't used inside the function?
Concerning FEAR: I don't think this is related to texture compression. I fiddled around with the ingame performance options yesterday and the GPU resets disappeared when I switched the engine from DX9 level to DX8 level pixel shaders. Maybe this is related to the GLSL piglit tests that still lockup the GPU.
Anyway, apart from manually enabling the envvar, this issue looks fixed to me.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
Dave Airlie airlied@freedesktop.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Dave Airlie airlied@freedesktop.org 2011-02-17 00:22:42 PST --- not sure if the rest of the code in Mesa is setup to use BC4 or BC5 if we do advertise them from the driver. I'd have to check what they correspond to I think they are for RGTC as opposed to S3TC
oh I should remove that level, it was used during some of my hacks.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
--- Comment #8 from Tobias Jakobi liquid.acid@gmx.net 2011-02-17 04:10:58 PST --- Yes, they are the RGTC formats.
I asked, because the formats are also advertised in r300g.
https://bugs.freedesktop.org/show_bug.cgi?id=32888
Vinson Lee vlee@vmware.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Vinson Lee vlee@vmware.com 2011-08-18 22:21:51 PDT --- Ubuntu 11.10 i386 mesa: 7.11-0ubuntu3 kernel: 3.0.0-8-generic
r600g has GL_EXT_texture_compression_s3tc on the above mention configuration.
dri-devel@lists.freedesktop.org