FlyCube icon indicating copy to clipboard operation
FlyCube copied to clipboard

Feature request : add DispatchMeshIndirect & DispatchRaysIndirect support

Open THISISAGOODNAME opened this issue 4 years ago • 6 comments

Or more universal api like dx12 ExecuteIndirect .

:)

THISISAGOODNAME avatar Mar 27 '21 03:03 THISISAGOODNAME

I thought about ExecuteIndirect, but unfortunately Vulkan does not have such api. VK_NV_device_generated_commands can be the equivalent of ExecuteIndirect, but it is not a final version yet, for example there is no DispatchRaysIndirect. I prefer to wait for KHR version.

andrejnau avatar Mar 27 '21 07:03 andrejnau

Another limitation is that Vulkan do not provide count version for all indirect calls. It does not allow emulating subset of ExecuteIndirect.

andrejnau avatar Mar 27 '21 07:03 andrejnau

Anyway, thank you for your feature request. I will add DispatchMeshIndirect/DispatchRaysIndirect support.

andrejnau avatar Mar 27 '21 08:03 andrejnau

DirectX 12 and Vulkan have different memory layout for arguments. D3D12_DISPATCH_MESH_ARGUMENTS vs VkDrawMeshTasksIndirectCommandNV and D3D12_DISPATCH_RAYS_DESC vs VkTraceRaysIndirectCommandKHR. It will require arguments patch on the gpu side. Sorry, I want to postpone this feature request until there is a way to do it without arguments buffer patching.

andrejnau avatar Mar 27 '21 11:03 andrejnau

I created https://github.com/KhronosGroup/Vulkan-Docs/issues/1486 I hope it affects something.

andrejnau avatar Mar 27 '21 12:03 andrejnau

DirectX 12 and Vulkan have different memory layout for arguments. D3D12_DISPATCH_MESH_ARGUMENTS vs VkDrawMeshTasksIndirectCommandNV and D3D12_DISPATCH_RAYS_DESC vs VkTraceRaysIndirectCommandKHR. It will require arguments patch on the gpu side. Sorry, I want to postpone this feature request until there is a way to do it without arguments buffer patching.

Thank you anyway.

THISISAGOODNAME avatar Mar 27 '21 13:03 THISISAGOODNAME