Bug 37476 - [wine] Devil May Cry 4: TXD tgsi opcode unsupported / translation from TGSI failed / missing vertex shader
[wine] Devil May Cry 4: TXD tgsi opcode unsupported / translation from TGSI f...
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600
git
x86 (IA32) All
: medium normal
Assigned To: mesa-dev
http://www.gamershell.com/download_27...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-22 13:05 UTC by Sven Arvidsson
Modified: 2011-06-16 10:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Incomplete patch (9.26 KB, patch)
2011-06-05 22:33 UTC, Mike Kaplinskiy
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Arvidsson 2011-05-22 13:05:15 UTC
The demo of the game Devil May Cry 4 (running in Wine) isn't rendering correctly, quite a few objects are missing. The following errors are printed on the terminal:

 EE r600_shader.c:829 tgsi_unsupported - TXD tgsi opcode unsupported
 EE r600_shader.c:118 r600_pipe_shader_create - translation from TGSI failed !
 EE r600_state_common.c:564 r600_draw_vbo - missing vertex shader
 EE r600_shader.c:829 tgsi_unsupported - TXD tgsi opcode unsupported
 EE r600_shader.c:118 r600_pipe_shader_create - translation from TGSI failed !
 EE r600_state_common.c:564 r600_draw_vbo - missing vertex shader

I used apitrace to capture the game, even though the trace ends in a segfault it's enough to reproduce the above errors.
http://dl.dropbox.com/u/28577999/dmc4.trace.7z (93M)

(To run the game in Wine native versions of WMASF.DLL and WMVCORE.DLL needs to be used)

System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: REDWOOD
-- Model: XFX Radeon HD 5670 1GB
-- Display connector: DVI
-- xf86-video-ati: 6.14.1
-- xserver: 1.10.1
-- mesa: git-fd6f2d6
-- drm: 2.4.25
-- kernel: 2.6.39
Comment 1 Mike Kaplinskiy 2011-06-05 22:32:34 UTC
[changing assignee as this is clearly a mesa bug]

piglit arb_shader_texture_lod-texgrad shows the problem (using texture2DGradARB). 
Currently running it may also get you a fortify crash due to TXD having 4 inputs (the max in the context structure is 3).

I'm attaching a patch that has an implementation. Unfortunately I can't seem to get it to work entirely correctly. The piglit test looks almost correct but has several artifacts in random places. If someone could point me in the right direction (as I'm completely clueless), I would be happy to finish it. In case it matters, piglit does not show any new failures from this patch.
Comment 2 Mike Kaplinskiy 2011-06-05 22:33:42 UTC
Created attachment 47580 [details] [review]
Incomplete patch
Comment 3 Sven Arvidsson 2011-06-07 12:50:02 UTC
Thanks for working on this. I can't comment on the patch, but the errors from the game are indeed gone now.

It's still not rendering correctly, but it might just as well be some other bug or a regression in Wine.
Comment 4 Dave Airlie 2011-06-14 23:58:39 UTC
Hi Mike,

you might have noticed I pushed something that worked, then found this patch, which I preferred to mine, so I fixed up the code with your authorship on a few patches derived from this.

Please test and let me know if it works for you, as I have a few differences from your code.

Dave.
Comment 5 Mike Kaplinskiy 2011-06-15 20:12:39 UTC
Hey Dave,

Seems to work fine here on barts. That "slight hack to make gradients always go into same cf" is what my patch was missing :(.

My patch had some error checks for the cases when there was no sampler (DDX/DDY), but those never seemed to be bothering anyone. I would say looks good to me :).

Sven, would you like to try your game again to see if the rendering is any better?

Mike.
Comment 6 Sven Arvidsson 2011-06-16 04:54:55 UTC
(In reply to comment #5)
> Sven, would you like to try your game again to see if the rendering is any
> better?

There's still rendering issues, but it seems to be shader compiler issues, so I'm going to file new bugs for these.

Thanks for working on this!
Comment 7 Sven Arvidsson 2011-06-16 10:24:11 UTC
FWIW the shader issues was resolved with an upgrade to the latest version of Wine.