I'm trying to replicate a CUDA/OptiX workflow with HLSL, and I ran into this issue while mixing a compute entry point and a closest hit entry point together in the same device program...
A bit of background, I want to use the compute entry point to fill in the instance buffer required for a TLAS build, so that I can update instance transforms in real time. Then, I use a closest hit program to interpolate vertex data of whatever instance was hit, and then that program returns a color via a ray payload.
When both of these stages are compiled into the same .spv file, it appears that certain built-in functions, like OpDecorate %7 BuiltIn WorldRayDirectionNV, are incorrectly listed in the interface list for the compute entry point (which does not reference this built-in function) :
OpEntryPoint GLCompute %vkrtFillInstanceData "vkrtFillInstanceData" ... %7 ...
This causes vkCreateComputePipelines to crash on AMD cards, in the driver and with no errors reported in any of the validation layers.
I'm trying to replicate a CUDA/OptiX workflow with HLSL, and I ran into this issue while mixing a compute entry point and a closest hit entry point together in the same device program...
A bit of background, I want to use the compute entry point to fill in the instance buffer required for a TLAS build, so that I can update instance transforms in real time. Then, I use a closest hit program to interpolate vertex data of whatever instance was hit, and then that program returns a color via a ray payload.
When both of these stages are compiled into the same .spv file, it appears that certain built-in functions, like
OpDecorate %7 BuiltIn WorldRayDirectionNV, are incorrectly listed in the interface list for the compute entry point (which does not reference this built-in function) :OpEntryPoint GLCompute %vkrtFillInstanceData "vkrtFillInstanceData" ... %7 ...This causes
vkCreateComputePipelinesto crash on AMD cards, in the driver and with no errors reported in any of the validation layers.