diff --git a/renderdoc/driver/vulkan/vk_common.h b/renderdoc/driver/vulkan/vk_common.h index 90b286406..16c5c3f01 100644 --- a/renderdoc/driver/vulkan/vk_common.h +++ b/renderdoc/driver/vulkan/vk_common.h @@ -41,6 +41,9 @@ // available identically on replay (which will be the case for 95% of cases). As // well as handling pNext being non-NULL which won't happen until extensions // come around. +// +// MULTIDEVICE - parts of the code that will need to be updated to support +// multiple devices or queues. #include "common/common.h" diff --git a/renderdoc/driver/vulkan/vk_dispatchtables.cpp b/renderdoc/driver/vulkan/vk_dispatchtables.cpp index c9825d595..f5e9f5f6d 100644 --- a/renderdoc/driver/vulkan/vk_dispatchtables.cpp +++ b/renderdoc/driver/vulkan/vk_dispatchtables.cpp @@ -78,7 +78,7 @@ void InitDeviceReplayTables(VkDevice device) VkLayerDispatchTable *table = GetDeviceDispatchTable(NULL); RDCASSERT(table); - // VKTODOLOW this won't work with multiple devices - will need a replay device table for each + // MULTIDEVICE each device will need a replay table #define DeviceGPA(func) table->func = (CONCAT(PFN_vk, func))table->GetDeviceProcAddr(device, STRINGIZE(CONCAT(vk, func))); diff --git a/renderdoc/driver/vulkan/vk_initstate.cpp b/renderdoc/driver/vulkan/vk_initstate.cpp index 0ded4c588..44c81a69b 100644 --- a/renderdoc/driver/vulkan/vk_initstate.cpp +++ b/renderdoc/driver/vulkan/vk_initstate.cpp @@ -1134,9 +1134,6 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res) VkDeviceMemory readbackmem = VK_NULL_HANDLE; - // VKTODOMED we just dump the backing memory for this image via an aliased buffer - // copy, instead of doing a proper copy from image to buffer, which would be - // independent of the image memory layout and do any unswizzling/untiling VkBufferCreateInfo bufInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0, VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT|VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT, 0, diff --git a/renderdoc/driver/vulkan/vk_manager.cpp b/renderdoc/driver/vulkan/vk_manager.cpp index 013f56a15..9683384ea 100644 --- a/renderdoc/driver/vulkan/vk_manager.cpp +++ b/renderdoc/driver/vulkan/vk_manager.cpp @@ -257,7 +257,7 @@ void VulkanResourceManager::SerialiseImageStates(map & // to get images into the right layout t.inputMask = 0; t.outputMask = 0; - // VKTODOLOW need to handle multiple queues better than this maybe + // MULTIDEVICE need to handle multiple queues t.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; t.destQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; t.image = Unwrap(GetCurrentHandle(liveid)); @@ -327,7 +327,6 @@ void VulkanResourceManager::ApplyTransitions(vector< pairResetCommandPool(device, cmdPool, flags); } @@ -715,7 +714,6 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands( { cmdBuffer = PartialCmdBuf(); - // VKTODOHIGH proper handling of partial sub-executes ObjDisp(cmdBuffer)->CmdExecuteCommands(Unwrap(cmdBuffer), count, &cmds[0]); } } @@ -727,7 +725,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands( const string desc = localSerialiser->GetDebugStr(); - AddEvent(NEXT_SUBPASS, desc); + AddEvent(EXEC_CMDS, desc); FetchDrawcall draw; draw.name = "vkCmdExecuteCommands()"; draw.flags |= eDraw_CmdList; diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index c3924700c..a1570e6b9 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -496,7 +496,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice( InitDeviceReplayTables(Unwrap(device)); - RDCASSERT(m_Device == VK_NULL_HANDLE); // VKTODOLOW multiple devices are not supported + RDCASSERT(m_Device == VK_NULL_HANDLE); // MULTIDEVICE m_Device = device; @@ -648,7 +648,7 @@ VkResult WrappedVulkan::vkCreateDevice( VkDevice device = *pDevice; - RDCASSERT(m_Device == VK_NULL_HANDLE); // VKTODOLOW multiple devices are not supported + RDCASSERT(m_Device == VK_NULL_HANDLE); // MULTIDEVICE m_Device = device; @@ -689,10 +689,10 @@ void WrappedVulkan::vkDestroyDevice(VkDevice device) SubmitCmds(); FlushQ(); - // VKTODOLOW handle multiple devices - this function will need to check - // if the device is the one we used for debugmanager/cmd pool etc, and - // only remove child queues and resources (instead of doing full resource - // manager shutdown) + // MULTIDEVICE this function will need to check if the device is the one we + // used for debugmanager/cmd pool etc, and only remove child queues and + // resources (instead of doing full resource manager shutdown). + // Or will we have a debug manager per-device? RDCASSERT(m_Device == device); // delete all debug manager objects diff --git a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp index 4fd99eb24..6efd46ecb 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp @@ -124,8 +124,7 @@ bool WrappedVulkan::ReleaseResource(WrappedVkRes *res) { if(res == NULL) return true; - // VKTODOLOW - this will break if we have multiple devices and resources from each, - // but that will likely break other things too. + // MULTIDEVICE need to get the actual device that created this object VkDevice dev = GetDev(); const VkLayerDispatchTable *vt = ObjDisp(dev); diff --git a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp index 8be1b8740..6d28f7b78 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp @@ -481,8 +481,8 @@ VkResult WrappedVulkan::vkQueueSubmit( if(found) { - // VKTODOLOW won't work with multiple devices - maybe find device for the specified queue? - // we probably only want to flush maps associated with this queue anyway + // MULTIDEVICE should find the device for this queue. + // MULTIDEVICE only want to flush maps associated with this queue VkDevice dev = GetDev(); {