[Bug 49186] New: DXBC compiler generates incorrect spir-v code

WineHQ Bugzilla wine-bugs at winehq.org
Sun May 17 09:48:56 CDT 2020


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 at winehq.org
          Reporter: alex.fishman at 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

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list