https://bugs.winehq.org/show_bug.cgi?id=54777
Bug ID: 54777 Summary: MojoShader HLSL requires 'any' intrinsic, for TEXKILL Product: vkd3d Version: 1.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hlsl Assignee: wine-bugs@winehq.org Reporter: flibitijibibo@gmail.com Distribution: ---
Created attachment 74274 --> https://bugs.winehq.org/attachment.cgi?id=74274 Random TMNT Pixel Shader
From MSDN: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hls...
Attached is some sample shader output from TMNT: Shredder's Revenge.
https://bugs.winehq.org/show_bug.cgi?id=54777
--- Comment #1 from Ethan Lee flibitijibibo@gmail.com --- Created attachment 74292 --> https://bugs.winehq.org/attachment.cgi?id=74292 Untested any() implementation
Attached is a patch that adds an intrinsic_any function. This is largely untested and I assume there's a better way to do this, but I'm not very good with IR :P
https://bugs.winehq.org/show_bug.cgi?id=54777
Ethan Lee flibitijibibo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #74292|0 |1 is obsolete| |
--- Comment #2 from Ethan Lee flibitijibibo@gmail.com --- Created attachment 74293 --> https://bugs.winehq.org/attachment.cgi?id=74293 Tested any() implementation
Fixed a couple bits and this attachment is the result - this was tested against FEZ, in combination with the discard patch at https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/136
https://bugs.winehq.org/show_bug.cgi?id=54777
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- For floats they are using dp* instructions, that's easy to do for float vectors. For ints/bools path is different it seems. For matrices it's optimized with row/column vectors.
I think it's fine to limit it to float vector/scalar case for now.
https://bugs.winehq.org/show_bug.cgi?id=54777
Ethan Lee flibitijibibo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #74293|0 |1 is obsolete| |
--- Comment #4 from Ethan Lee flibitijibibo@gmail.com --- Created attachment 74295 --> https://bugs.winehq.org/attachment.cgi?id=74295 Tested any() implementation (float/bool only)
v3 restricts any() support for vector/scalar-only, float/bool-only. The reason I ended up adding bool support was because that's what MojoShader uses it for (for example, "if any(r0.xyz > 0) discard;"), so even though it's _probably_ not accurate it at least works for our situation.
https://bugs.winehq.org/show_bug.cgi?id=54777
--- Comment #5 from Ethan Lee flibitijibibo@gmail.com --- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/157
https://bugs.winehq.org/show_bug.cgi?id=54777
Ethan Lee flibitijibibo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |0668d32631cb4b393375be18d2e | |ed6f999bebc8f Resolution|--- |FIXED
--- Comment #6 from Ethan Lee flibitijibibo@gmail.com --- Fixed by https://gitlab.winehq.org/wine/vkd3d/-/commit/0668d32631cb4b393375be18d2eed6...
https://bugs.winehq.org/show_bug.cgi?id=54777
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- Closing bugs fixed in 1.9.