DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
SPIR-V degradation 1.7.2207.10069 compare to 1.7.2207.10036
After upgrading from 1.7.2207.10036 to 1.7.2207.10069 I got pixel shader compilation error:
C:\Users\Goshido\Desktop\1>"D:\Development\DXC-builds\Release-2022-10-09\bin\dxc.exe" -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -T ps_6_7 -E PS -Fo mandelbrot-lut-color-ps.spv mandelbrot-lut-color.ps
fatal error: generated SPIR-V is invalid: Back-edges (35[%35] -> 32[%32]) can only be formed between a block and a loop header.
%35 = OpLabel
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
C:\Users\Goshido\Desktop\1>"D:\Development\DXC-builds\Release-2022-10-09\bin\dxc.exe" -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -T ps_6_7 -E PS -Fo mandelbrot-analytic-color-ps.spv mandelbrot-analytic-color.ps
fatal error: generated SPIR-V is invalid: Back-edges (37[%37] -> 34[%34]) can only be formed between a block and a loop header.
%37 = OpLabel
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
Compilation to SPIR-V worked previously in version 1.7.2207.10036.
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.2207.10069 executable.
Expected result
Compilation success. DXC produces SPIR-V binaries.
Actual result
Compilation error:
C:\Users\Goshido\Desktop\1>"D:\Development\DXC-builds\Release-2022-10-09\bin\dxc.exe" -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -T ps_6_7 -E PS -Fo mandelbrot-lut-color-ps.spv mandelbrot-lut-color.ps
fatal error: generated SPIR-V is invalid: Back-edges (35[%35] -> 32[%32]) can only be formed between a block and a loop header.
%35 = OpLabel
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
C:\Users\Goshido\Desktop\1>"D:\Development\DXC-builds\Release-2022-10-09\bin\dxc.exe" -HV 2021 -spirv -fvk-use-dx-layout -fspv-reduce-load-size -fspv-target-env=vulkan1.1 -enable-16bit-types -WX -O3 -T ps_6_7 -E PS -Fo mandelbrot-analytic-color-ps.spv mandelbrot-analytic-color.ps
fatal error: generated SPIR-V is invalid: Back-edges (37[%37] -> 34[%34]) can only be formed between a block and a loop header.
%37 = OpLabel
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
No SPIR-V binaries.
Further technical details
- Commit SHA-1:
81ef064a47a191c9fc68a43adca4706244c3687b
-
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 [2022/10/09].
- Windows 11 Pro 64-bit (10.0 Build 22000, Version 21H2)
Would you kindly help?