floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.53k stars 467 forks source link

D3D11 storage buffers do not compile on wine #1057

Closed johnalanbrook closed 1 month ago

johnalanbrook commented 1 month ago

When running my program under wine, the d3d11 compiler fails to compile the source code generated by the SPIRV output. Relevant error:

011c:err:d3dcompiler:D3DCompile2 Failed to compile shader, vkd3d result -4. 011c:err:d3dcompiler:D3DCompile2 Shader log: 011c:err:d3dcompiler:D3DCompile2 :10:19: E5030: Unknown modifier "_18". 011c:err:d3dcompiler:D3DCompile2 :10:1: E5030: Unknown modifier "ByteAddressBuffer". 011c:err:d3dcompiler:D3DCompile2 :10:23: E5000: syntax error, unexpected ':'

And relevant generated source code:

ByteAddressBuffer _18 : register(t16);

I'm unsure of where to submit this bug to. It might be an error with my wine installation. I'm unsure if it's an error with the SPIRV output, an error with wine's d3dcompiler, something with sokol_gfx or sokol-shdc. I tried compiling it as both hlsl4 and hlsl5.

johnalanbrook commented 1 month ago

Solution was to install dxvk for wine, which I did via winetricks.