Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIR-V degradation 1.7.2212.10204 compare to 1.7.2212.10142 #5342

Closed
Goshido opened this issue Jun 28, 2023 · 2 comments
Closed

SPIR-V degradation 1.7.2212.10204 compare to 1.7.2212.10142 #5342

Goshido opened this issue Jun 28, 2023 · 2 comments
Assignees
Labels
bug Bug, regression, crash spirv Work related to SPIR-V

Comments

@Goshido
Copy link

Goshido commented Jun 28, 2023

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?

@llvm-beanz llvm-beanz added the needs-triage Awaiting triage label Jun 29, 2023
@llvm-beanz llvm-beanz moved this to For Google in HLSL Triage Jun 30, 2023
@llvm-beanz llvm-beanz added the spirv Work related to SPIR-V label Jun 30, 2023
@s-perron s-perron self-assigned this Jun 30, 2023
@s-perron
Copy link
Collaborator

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

@github-project-automation github-project-automation bot moved this from For Google to Done in HLSL Triage Jun 30, 2023
@s-perron s-perron added bug Bug, regression, crash and removed needs-triage Awaiting triage labels Jun 30, 2023
@llvm-beanz llvm-beanz removed this from HLSL Triage Jun 30, 2023
s-perron pushed a commit that referenced this issue Jul 4, 2023
…entric (SV_Barycentrics)" (#5384)

Reverts #4638
This PR causes multiples issues (#5326, #5342, #5270). Reverting, will
need more testing.

Fixed #5270
@Goshido
Copy link
Author

Goshido commented Jul 4, 2023

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
Labels
bug Bug, regression, crash spirv Work related to SPIR-V
Projects
None yet
Development

No branches or pull requests

3 participants