-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VK_KHR_deferred_host_operations needs to be implemented before adding Raytracing Support #1953
Comments
I’m not that familiar with MoltenVK, but I’m guessing the best first steps here would be to add a |
Would an opaque handle of |
Personally I think that’s a good fit. This is a synchronization mechanism for sure, just a bit unique in that it’s about host-side asynchronous operations. Only thing I wonder about is if this is part of “GPUObjects” or something else, since it’s a host-side thing, not necessarily a GPU side thing. Worst case we can move it around later on in a pull request. |
Thanks for the insight, I plan to start a PR on Monday/Tuesday |
Another thing, how do we store the function pointer? There seems to be a variety of different functions from different extensions that can take a deferred operation. This means that the deferred operation needs to be able to refer to and execute the original operation. Issue is that each of these function has different parameters, so Maybe we could create a union with each type of function, would that be all right? Example: union MVKDeferableOperations
{
std::function<VkResult(
VkDevice,
VkDeferredOperationKHR
VkPipelineCache
uint32_t
const VkRayTracingPipelineCreateInfoKHR*
const VkAllocationCallbacks*
VkPipeline*
), // vkCreateRayTracingPipelinesKHR
std::function<VkResult(
VkDevice
VkDeferredOperationKHR
uint32_t,
const VkMicromapBuildInfoEXT*
)>, // vkBuildMicromapsEXT
// ect ...
}; For each and every function that uses |
Opened a pull request, please link the issue with it: #1954 |
IMO, a union seems like a decent way to do it. So long as there is a clear organization that can be extended. |
That's how I implemented it, everytime a new vulkan command is implemented requiring deferred operations, you add the operations functions pointer to the union and also add the function to an enum that will manage with variable in the union should be used. |
Indirectly related to this issue, does Metal RT support host-side acceleration structure construction? (iiuc, that’s the reason this is a dependency of that, right?) If it doesn’t, then is it possible to still support vk_khr_acceleration_structure? |
Nope. It only has device-side builds.
Yes, because host-side builds are an optional feature. |
This issue can be closed, because it has been resolved in PR #1954 that has now been merged. The next step to raytracing would be to implement acceleration structures, I plan to create an issue soon. |
Nice work!! Looking forward to the next issue / PR. Acceleration structures will be a tougher to implement I’d imagine, but if helps at all, I have a Vulkan ray tracing framework where I could test certain features as they’re added. |
Thanks I just opened an issue #1956 |
In issue #427 there has been discussion about the implementation of
VK_KHR_ray_tracing_pipeline
orVK_KHR_ray_query
. Both of these extensions need theVK_KHR_acceleration_structure
extension to work. To implement acceleration structures, we need theVK_KHR_deferred_host_operation
, which allows for heavy operations that can take longer to do to be deferred until later. So as a small step towards raytracing, deferred_host_operations could be implemented.This issue is dependent on issue #427
Edit: I'd like to try and implement this, could somebody point me to which files would need to be modified as I'm not quite sure where to start
The text was updated successfully, but these errors were encountered: