https://bugs.winehq.org/show_bug.cgi?id=49186
Bug ID: 49186 Summary: DXBC compiler generates incorrect spir-v code Product: vkd3d Version: 1.1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vkd3d Assignee: wine-bugs@winehq.org Reporter: alex.fishman@gmail.com Distribution: ---
Created attachment 67204 --> https://bugs.winehq.org/attachment.cgi?id=67204 dxbc tessellaton control shader
I'm having issues with tessellation shaders. Seems that the generated spir-v code is incorrect. After converting the spir-v to GLSL (spirv-dis) and validating it (glslangValidator) there are errors in the the following section:
#version 450 layout(vertices = 5) out; out float gl_ClipDistance[5]; layout(location = 0) out vec2 o0[5]; layout(location = 1) out vec4 o1[5]; vec4 opc[4]; vec4 v1[5]; void control0() { v1[1u] = vec4(gl_ClipDistance[0u]); v1[2u] = vec4(gl_ClipDistance[1u]); v1[3u] = vec4(gl_ClipDistance[2u]); v1[4u] = vec4(gl_ClipDistance[3u]); v1[5u] = vec4(gl_ClipDistance[4u]); vec4 r0; r0.x = intBitsToFloat(gl_InvocationID); o0[gl_InvocationID] = gl_in[floatBitsToInt(r0.x)].gl_Position.xy; o1[gl_InvocationID] = v1[floatBitsToInt(r0.x)]; } ...
glslangValidator outputs the following error: ERROR: 0:4: 'gl_ClipDistance' : identifiers starting with "gl_" are reserved ERROR: 1 compilation errors. No code generated.
Sample DXBC binary is attached