Can you upload the problematic shaders? (the DXIL code)
Shader
// Compile with dxc -T lib_6_4 -Fo DxilRootSig.dxil
ByteAddressBuffer inbuf : register(t0);
RWByteAddressBuffer outbuf : register(u0);
[shader("raygeneration")]
void RayGen()
{
uint offset = DispatchRaysIndex().x * 4;
float loaded = inbuf.Load<float>(offset);
outbuf.Store<float>(offset, loaded + 0.1);
}
// The root signature can be extracted from the dxil binary with CreateRootSignature
GlobalRootSignature root =
{
"DescriptorTable(UAV(u0))," // Output
"DescriptorTable(SRV(t0))" // Input
};
RaytracingShaderConfig ShaderConfig =
{
16, // max payload size
8 // max attribute size
};
SubobjectToExportsAssociation association = {"ShaderConfig","RayGen"};
RaytracingPipelineConfig PipelineConfig =
{
1 // Max recursion depth
};
DXIL (renamed to .txt so that GitHub accepts it): DxilRootSig.dxil
Is this actually supposed to work? We support RTS0 section CreateRootSignature [RootSignature()] method, but not creating a root signature from DXIL internal state object.
Is this actually supposed to work?
I can’t say much about it other than that it works fine on every windows system I tested on (about 4) and that nobody screamed when it was mentioned as the way to go on the dxc issue linked above :)
:crying_cat_face:
Thank you! It’s working as on Windows now
VKD3D_CONFIG=vk_debug,dxr`.x1 2023-05VKD3D_DEBUG=tracex1 2023-05VKD3D_SHADER_CACHEx1 2023-05
CreateRootSignaturecan be used to extract a root signature that is specified in HLSL.The root signature is compiled into dxil and can be used by handing the compiled dxil container to
CreateRootSignature.There was discussion around that here: https://github.com/microsoft/DirectXShaderCompiler/issues/2315
Trying this currently fails, my guess is this is not implemented in vkd3d as it’s probably uncommon among games.
Software information
A small, (currently) closed-source test program.
I’m running with
VKD3D_DEBUG=trace VKD3D_CONFIG=vk_debug,dxr.System information
Log files