I've noticed that I cannot specify a root signature in the HLSL code of a DXR shader. For example, if I got a ray generation shader with the following declaration
[rootsignature(
"RootFlags(LOCAL_ROOT_SIGNATURE)," \
"DescriptorTable(" \
"UAV(u0, numDescriptors = 1)," \
"SRV(t0, numDescriptors = 1))")]
[shader("raygeneration")]
void RayGen()
{}
CreateRootSignature yields the error message
No root signature was found in the dxil library provided to CreateRootSignature. [ STATE_CREATION ERROR #696: CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND].
I've noticed that even when I add a typo (for example, write roosignature instead of rootsignature), the compiler doesn't complain about this typo. So, it seems like the whole attribute declaration is simply ignored.
If I change the code to a simple rasterization shader, everything works as expected.
So, is the specification of a root signature in the HLSL code of a DXR shader not supported?
RootSignaturein Pascal Case) \$\endgroup\$RandS? That's not the source of the problem. Changed it accordingly, the problem remains. (And as I wrote in the question, the compiler doesn't even complain about any typo inside the brackets.) \$\endgroup\$