Skip to content

SPIR-V degradation 1.7.2212.10204 compare to 1.7.2212.10142 #5342

Closed

Description

After upgrading from 1.7.2212.10142 to 1.7.2212.10204 I got pixel shader compilation errors in three shaders. Compilation to SPIR-V worked previously in version 1.7.2212.10142.

Minimal repro steps

I attached minimal reproducible example with pixel shader sources and bat script with all compilation parameters. You need to change DXC_LOCATION variable inside the build-test.bat to dxc.exe v1.7.2212.10204 executable.

Direct link to issue-001.zip

Expected result

Compilation success. DXC produces SPIR-V binaries.

Actual result

Compilation error:

Compiling: D:\Development\DXC-builds\Release-2023-06-28\bin\dxc.exe -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -I .\..\..\..\hlsl -I .\..\..\..\cpp\include\pbr -E PS -T ps_6_7 -Fo .\..\..\..\assets\shaders\opaque-ps.spv .\..\..\..\hlsl\opaque.ps
fatal error: generated SPIR-V is invalid: Indexes passed to OpAccessChain must be of type integer.
  %73 = OpAccessChain %_ptr_Uniform_ObjectData %72 %71

note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible

Done

Compiling: D:\Development\DXC-builds\Release-2023-06-28\bin\dxc.exe -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -I .\..\..\..\hlsl -I .\..\..\..\cpp\include\pbr -E PS -T ps_6_7 -Fo .\..\..\..\assets\shaders\stipple-ps.spv .\..\..\..\hlsl\stipple.ps
fatal error: generated SPIR-V is invalid: Indexes passed to OpAccessChain must be of type integer.
  %103 = OpAccessChain %_ptr_Uniform_ObjectData %102 %100

note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible

Done

Compiling: D:\Development\DXC-builds\Release-2023-06-28\bin\dxc.exe -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -I .\..\..\..\hlsl -I .\..\..\..\cpp\include\pbr -E PS -T ps_6_7 -Fo .\..\..\..\assets\shaders\ui-ps.spv .\..\..\..\hlsl\ui.ps
Internal compiler error: access violation. Attempted to read from address 0x0000000000000030
Done

No SPIR-V binaries.

Further technical details

  • git submodule update --init has been invoked before build
  • hctbuild build parameters: -official -rel -x64 -vs2022 -speak-up -no-dxilconv -spirv
  • Visual Studio 2022 Community components were up to date [2023/06/28].
  • Windows 11 Pro 64-bit (22621.1848, Version 22H2)

Would you kindly help?

Activity

  1. added
    spirv
    on Jun 30, 2023
  2. s-perron commented on Jun 30, 2023

    @s-perron
    Collaborator

    This is a duplicate of #5270. The fix for that issue should also fix this one.

  3. moved this from For Google to Done in HLSL Triageon Jun 30, 2023
  4. added
    bug
    and removed
    needs-triage
    on Jun 30, 2023
  5. Goshido commented on Jul 4, 2023

    @Goshido
    Author

    DirectX Shader Compiler v1.7.2212.10216 2096d1b8054d1de864924ef0c5009f533597b9d4 does not have the issue anymore.

    Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugspirv

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions