Open MarijnS95 opened 1 year ago
sigh
My least favorite pass strikes again:
cannot flatten hlsl intrinsic.Assertion failed: (false && "cannot flatten hlsl intrinsic."), function RewriteCall, file ScalarReplAggregatesHLSL.cpp, line 2761.
Oh indeed, on a newer compiler (from https://github.com/microsoft/DirectXShaderCompiler/commit/6287d513d1f791715a9e3b1ad01e8287aeca0d6b) this is now an assert.
It's still an assert for the simple example above, but usually a deadlock on the bigger, massively-parallel-compiled shaders in our project.
Fortunately some unrelated issue we were facing (multiple identical compile invocations returning vastly different DXIL blobs) has magically been solved, and we can now upgrade to the latest DXC :)
Looks like this still repros: https://godbolt.org/z/z11rb6E6E
We're clearly giving the builtin RayDesc struct some extra handling, but you can workaround this by writing your own RayDesc struct:
Our previous shader compiler came from https://github.com/microsoft/DirectXShaderCompiler/commit/0392e60dbc87bf8aa5cbfe826622b517fe39fde0 which worked fine. We now downloaded new blobs from https://github.com/microsoft/DirectXShaderCompiler/commit/ea3623fdf712fdab2d247e9f0c4e41daef43e9b8 / https://ci.appveyor.com/project/dnovillo/directxshadercompiler/builds/47177077 and observe a deadlock with the following pattern:
repro.hlsl
:Run
dxc
from the above (Windows or Linux) download, and observe that the command runs indefinitely:I understand
RayDesc
to be a simple POD, and copying that into a localRayDesc2
struct and loading that doesn't deadlock.