https://bugs.winehq.org/show_bug.cgi?id=45038
Bug ID: 45038 Summary: Shadow Tactics displays a pink screen Product: Wine Version: 3.6 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: [email protected] Reporter: [email protected] Distribution: ---
Created attachment 61160 --> https://bugs.winehq.org/attachment.cgi?id=61160 Terminal Output
If you start Shadow Tactics it will render a pink screen.
https://bugs.winehq.org/show_bug.cgi?id=45038
Toni [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected]
--- Comment #1 from Toni [email protected] --- This is because of the d3dcompiler error:
002e:err:d3dcompiler:compile_shader HLSL shader parsing failed.
Should go away if you 'winetricks d3dcompiler_43'
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #2 from Toni [email protected] --- Although the native d3dcompiler is a workaround, to properly debug the issue you should also post a log running wine with 'WINEDEBUG=+d3d_shader' (I think)
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #3 from Toni [email protected] --- Actually, just checked and there is a debug channel for d3dcompiler, so best is posting a log running with the environment variable set as follows:
WINEDEBUG=+d3d_shader,+d3dcompiler
(also, please make sure to make the log without the native d3dcompiler_43)
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #4 from Ker noa [email protected] --- Created attachment 61165 --> https://bugs.winehq.org/attachment.cgi?id=61165 Tracing d3d
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #5 from Toni [email protected] --- this seems to be the interesting bit:
0036:trace:d3dcompiler:compilation_message :1:17: error: syntax error, unexpected KW_CBUFFER 0036:trace:d3dcompiler:compile_shader Compiler messages: 0036:trace:d3dcompiler:compile_shader ":1:17: error: syntax error, unexpected KW_CBUFFER\n" 0036:trace:d3dcompiler:compile_shader Shader source: 0036:trace:d3dcompiler:compile_shader "# 1 "" 1\ncbuffer MyCB : register(b0) {\n\tfloat4x4 worldMatrix;\n}\nvoid VS (float3 pos : POSITION, float4 color : COLOR, out float4 ocolor : COLOR, out float4 opos : SV_Position) {\n\topos = mul (worldMatrix, float4(pos,1));\n\tocolor = color;\n}\nfloat4 PS (float4 color : COLOR) : SV_TARGET {\n\t"... 0036:err:d3dcompiler:compile_shader HLSL shader parsing failed.
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #6 from Toni [email protected] --- You could change the title of this issue to:
"Shadow Tactics displays a pink screen (d3dcompiler: syntax error, unexpected KW_CBUFFER)"
Also the component for this bug is definitely d3dcompiler
I guess there can be more errors on the d3dcompiler after this one but we won't know until this is fixed, changing the title can help in getting a developer into it since the possible fix will be more evident on first view on the bug listing (I think this is for Matteo Bruni since it looks like he coded wine's d3dcompiler).
https://bugs.winehq.org/show_bug.cgi?id=45038
Ker noa [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Shadow Tactics displays a |Shadow Tactics displays a |pink screen |pink screen (d3dcompiler: | |syntax error, unexpected | |KW_CBUFFER) Component|-unknown |directx-d3d
https://bugs.winehq.org/show_bug.cgi?id=45038
tokktokk [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected]
https://bugs.winehq.org/show_bug.cgi?id=45038
Matteo Bruni [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Component|directx-d3d |directx-d3dx11
--- Comment #7 from Matteo Bruni [email protected] --- Wine's HLSL compiler needs a lot of work still, large parts of the implementation are simply missing.
https://bugs.winehq.org/show_bug.cgi?id=45038
joaopa [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected]
--- Comment #8 from joaopa [email protected] --- Just a thought about this bug cannot this freely usable project be used to implement HLSL compiler: https://github.com/microsoft/DirectXShaderCompiler/tree/master/tools
https://bugs.winehq.org/show_bug.cgi?id=45038
Zebediah Figura [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected]
--- Comment #9 from Zebediah Figura [email protected] --- (In reply to joaopa from comment #8)
Just a thought about this bug cannot this freely usable project be used to implement HLSL compiler: https://github.com/microsoft/DirectXShaderCompiler/tree/master/tools
Broadly, no. That compiler only targets DXIL. The only part that would be potentially useful is the part that's mostly already implemented, viz. parsing out the language into some form of IR. (That might help this bug in specific, but it's really not worth it. I have patches to implement parsing of buffer declarations anyway, which I'm hoping to have upstreamed by 6.0 and ideally much earlier.)
https://bugs.winehq.org/show_bug.cgi?id=45038
Anastasius Focht [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Keywords| |download URL| |https://web.archive.org/web | |/20200228100621/https://www | |.braynzarsoft.net/file/12 Summary|Shadow Tactics displays a |Multiple DirectX games and |pink screen (d3dcompiler: |applications fail to run |syntax error, unexpected |within builtin HLSL |KW_CBUFFER) |compiler, reporting HLSL | |shader parsing failure | |'d3dcompiler: syntax error, | |unexpected KW_CBUFFER'
--- Comment #10 from Anastasius Focht [email protected] --- Hello folks,
there are a lot more apps/games affected by this general insufficiency. Refining the fields to make it easier to find and to avoid duplicate bug reports (collecting them here).
Using the DX11 examples collection from bug 48685:
03. DirectX 11 - Braynzar Soft Tutorials -> 12. Blending
https://www.braynzarsoft.net/viewtutorial/q16390-12-blending
https://www.braynzarsoft.net/file/12
--- snip --- $ unzip -l DX11_Lesson_12_Blending_zip.zip Archive: DX11_Lesson_12_Blending_zip.zip Length Date Time Name --------- ---------- ----- ---- 0 09-18-2011 11:54 d3d11Blending/ 0 09-18-2011 11:54 d3d11Blending/d3d11Blending/ 84083 12-23-2009 13:34 d3d11Blending/d3d11Blending/braynzar.jpg 16896 09-18-2011 11:54 d3d11Blending/d3d11Blending/d3d11Blending.exe 3989 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj 1019 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj.filters 143 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj.user 493 09-18-2011 11:54 d3d11Blending/d3d11Blending/Effects.fx 19828 09-18-2011 11:54 d3d11Blending/d3d11Blending/main.cpp 906 06-13-2011 18:16 d3d11Blending/d3d11Blending.sln 13312 06-15-2011 20:28 d3d11Blending/d3d11Blending.suo --------- ------- 140669 11 files --- snip ---
Work around bug 48685 ("Multiple games and applications need D3DX11CompileFromFile implementation") -> 'winetricks -q d3dx11_42'
--- snip --- $ WINEDEBUG=+seh,+relay,+d3d,+d3dcompiler wine ./d3d11Blending.exe >>log.txt 2>&1 ... 0048:Call d3dcompiler_42.D3DCompile(00a911e8,000001ed,00a911a0 "Effects.fx",00000000,00a90f00,00a911b8 "VS",00a911d0 "vs_4_0",00000000,00000000,004053c8,00000000) ret=00339672 ... 0048:trace:d3dcompiler:D3DCompile data 00A911E8, data_size 493, filename "Effects.fx", defines 00000000, include 00A90F00, entrypoint "VS", target "vs_4_0", sflags 0, eflags 0, shader 004053C8, error_messages 00000000. 0048:trace:d3dcompiler:D3DCompile2 data 00A911E8, data_size 493, filename "Effects.fx", defines 00000000, include 00A90F00, entrypoint "VS", target "vs_4_0", sflags 0, eflags 0, secondary_flags 0, secondary_data 00000000, secondary_data_size 0, shader 004053C8, error_messages 00000000. ... 0048:trace:d3dcompiler:wpp_open Opening include "Effects.fx". ... 0048:trace:d3dcompiler:compile_shader Preprocessed shader source: "# 1 "Effects.fx" 1\n\r\ncbuffer cbPerObject\r\n{\r\n\tfloat4x4 WVP;\r\n};\r\n\r\nTexture2D ObjTexture;\r\nSamplerState ObjSamplerState;\r\n\r\nstruct VS_OUTPUT\r\n{\r\n\tfloat4 Pos : SV_POSITION;\r\n\tfloat2 TexCoord : TEXCOORD;\r\n};\r\n\r\nVS_OUTPUT VS(float4 inPos : POSITION, float2 in"... 0048:trace:d3dcompiler:compile_shader Checking compilation target "vs_4_0" ... 0048:trace:d3dcompiler:push_scope Pushing a new scope ... 0048:trace:d3dcompiler:compilation_message Effects.fx:2:8: error: syntax error, unexpected KW_CBUFFER ... 0048:trace:d3dcompiler:compile_shader Compiler messages: 0048:trace:d3dcompiler:compile_shader "Effects.fx:2:8: error: syntax error, unexpected KW_CBUFFER\n" 0048:trace:d3dcompiler:compile_shader Shader source: 0048:trace:d3dcompiler:compile_shader "# 1 "Effects.fx" 1\n\r\ncbuffer cbPerObject\r\n{\r\n\tfloat4x4 WVP;\r\n};\r\n\r\nTexture2D ObjTexture;\r\nSamplerState ObjSamplerState;\r\n\r\nstruct VS_OUTPUT\r\n{\r\n\tfloat4 Pos : SV_POSITION;\r\n\tfloat2 TexCoord : TEXCOORD;\r\n};\r\n\r\nVS_OUTPUT VS(float4 inPos : POSITION, float2 in"... ... 0048:err:d3dcompiler:compile_shader HLSL shader parsing failed. ... 0048:trace:seh:raise_exception code=c0000005 flags=0 addr=0x401720 ip=00401720 tid=0048 0048:trace:seh:raise_exception info[0]=00000000 0048:trace:seh:raise_exception info[1]=00000000 0048:trace:seh:raise_exception eax=00000000 ebx=0032fe88 ecx=00a93610 edx=00362958 esi=00000000 edi=0043b6c8 0048:trace:seh:raise_exception ebp=0032fe80 esp=0032f9c0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 0048:trace:seh:call_stack_handlers calling handler at 0x403599 code=c0000005 flags=0 0048:Call ... wine: Unhandled page fault on read access to 00000000 at address 00401720 (thread 0048), starting debugger... --- snip ---
$ du -sh DX11_Lesson_12_Blending_zip.zip 88K DX11_Lesson_12_Blending_zip.zip
$ sha1sum DX11_Lesson_12_Blending_zip.zip 9063be4fb49ec705daec283135530f18dd8524eb DX11_Lesson_12_Blending_zip.zip
$ wine --version wine-5.2-312-gc6b852e3c3
Regards
https://bugs.winehq.org/show_bug.cgi?id=45038
Zebediah Figura [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3dx11 |directx-d3d-util
https://bugs.winehq.org/show_bug.cgi?id=45038
--- Comment #11 from Gijs Vermeulen [email protected] --- It seems at least the D3D11 sample is fixed with vkd3d-git and wine-8.0-169-gaabdb15458a. I forced d3dcompiler to builtin and made sure it didn't load any native d3d* dlls. It now runs into bug 48804 without having to have native d3dcompiler installed. With native d3dx11_42 it runs fully.
https://bugs.winehq.org/show_bug.cgi?id=45038
Nikolay Sivov [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|3.6 |1.9 Component|d3d-util |hlsl Product|Wine |vkd3d
https://bugs.winehq.org/show_bug.cgi?id=45038
Nikolay Sivov [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #12 from Nikolay Sivov [email protected] --- This is too non-specific, 'cbuffer' keyword is supported now. I'm going to mark this fixed. Individual applications need to be retested.
https://bugs.winehq.org/show_bug.cgi?id=45038
Nikolay Sivov [email protected] changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Nikolay Sivov [email protected] --- Closing bugs fixed in 1.13.