Closed himanshugoel2797 closed 4 years ago
It is not possible to use semaphores in frames of RadeonRays API. However, it is possible to use external to the library VkCommandBuffer, create RadeonRays command stream from it and then use for RadeonRays operation. After that you can use initial vulkan command buffer to submit all the tasks to vulkan queue.
VkCommandBuffer command_buffer;
// init command buffer
rrGetCommandStreamFromVkCommandBuffer(context, command_buffer, &command_stream);
// use command_stream for RadeonRays specific code
// add some other vulkan things to command_buffer, e.g
vkCmdCopyBuffer(command_buffer, hits_buffer, staging_hits_buffer, 1u, ©_region);
vkEndCommandBuffer(command_buffer);
// fill vkSubmitInfo and submit queue where you can use semaphores
Ah, that did the trick! Thanks for the help :)
I'm trying to integrate the library into my vulkan game engine, but for it to fit nicely into the vulkan pipeline (and particularly since the library chooses to handle command buffer submission itself), can we please get a way to pass in vulkan semaphores to rrSubmitCommandStream?