Compiling simple shaders causes assertion failure
Task Info (Flyspray) | |
---|---|
Opened By | Krzysztof Bogacki (Saancreed) |
Task ID | 77394 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2023-02-05 02:08:11 UTC |
Status | Assigned |
Assignee | Laurent Carlier (lordheavy) |
Details
Description:
Attempting to compile simple HLSL shaders to DXIL with dxc from Arch repo causes an assertion failure and results in a core dump. Binaries provided by Microsoft successfully compile the same shaders.
Additional info:
- package version(s): directx-shader-compiler=1.7.2212-1
- config and/or log files: see below
Steps to reproduce:
$ curl -Lso ./shaders.hlsl 'https://raw.githubusercontent.com/microsoft/DirectX-Graphics-Samples/master/Samples/Desktop/D3D12HelloWorld/src/HelloTriangle/shaders.hlsl' $ dxc -E VSMain -T vs_6_0 -Fo ./vs.dxil ./shaders.hlsl; echo $?; file ./vs.dxil
Result:
dxc: /build/directx-shader-compiler/src/directx-shader-compiler-1.7.2212/lib/IR/User.cpp:44: void llvm::User::allocHungoffUses(unsigned int, bool): Assertion `HasHungOffUses && "alloc must have hung off uses"' failed. Aborted (core dumped) 134 ./vs.dxil: cannot open './vs.dxil' (No such file or directory)
Expected result (including reproduction steps):
$ curl -Ls 'https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2212/linux_dxc_2022_12_16.tar.gz' | bsdtar xf - $ chmod +x ./bin/x64/dxc $ LD_LIBRARY_PATH=~+/lib/x64 ./bin/x64/dxc -E VSMain -T vs_6_0 -Fo ./vs.dxil ./shaders.hlsl; echo $?; file ./vs.dxil warning: DXIL.dll not found. Resulting DXIL will not be signed for use in release environments.
0 ./vs.dxil: data