LunarG / gfxreconstruct

Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior
https://vulkan.lunarg.com/doc/sdk/latest/linux/capture_tools.html
MIT License
400 stars 114 forks source link

Adjust Queue Family on replay #1626

Open locke-lunarg opened 2 months ago

locke-lunarg commented 2 months ago

I think we could add an option for adjusting Queue Family on replay. For example, the queue on a captured file is family 1, and its flags have VIDEO_ENCODE. But the queue family 1 on replay doesn't support VIDEO_ENCODE, and queue family 2 supports it. We could adjus the value of queue family from 1 to 2 on every function call during replay. VkDeviceQueueCreateInfo could create all queues for adjusting. If it happens that running out of the count of queue family index, print ERROR log.

bradgrantham-lunarg commented 2 months ago

Like virtual swapchain but for Queues?

bradgrantham-lunarg commented 2 months ago

See also #856

locke-lunarg commented 2 months ago

It's much simpler than virtual swapchain. It just adjust the value of queueFamilyIndex to the one that is compatible with the captured queue family index. It might also adjust queueIndex for GetDeviceQueue. It's not like virtual swapchain to create new objects to replace original objects, so I don't call it "virtual queue".

It's also different with #856 that attempt to use one queue for everything on replay. It still has the same count of queues, and these queues still do the same things. The different is the queues are from different family to the captured queues.

I don't know if this idea will work or not.

locke-lunarg commented 2 months ago

The queueFamilyIndex on VkCommandPoolCreateInfo, VkSwapchainCreateInfoKHR, VkVideoSessionCreateInfoKHR and more also have to be adjusted to new value.