Summary: | [r600g] GL_EXT_texture_compression_s3tc support | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Drivers/Gallium/r600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | CC: | b.bellec, ernstp |
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Disable CS check for textures |
Description
Vinson Lee
2011-01-06 18:22:30 UTC
wine also kind of requires this extension, since s3tc is mandatory for Direct3D translation inside the wined3d layer. 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=c2c55547dc36f404e29dbc9253166f90df6783af The corresponding debug option here: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6baad55f157387d0bb44144680a96bc32280109f I dunno how this should have ever worked, when the kernel immediately rejects these formats? More spam: I found this interesting thread in the Phoronix forums: http://phoronix.com/forums/showthread.php?25679-S3TC-gt-r600-c-g/page7 Created attachment 43156 [details] [review] 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 :) 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. 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. 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. Yes, they are the RGTC formats. I asked, because the formats are also advertised in r300g. 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. |
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.