mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-13 02:01:08 +00:00
Remove VKTODOs for tasks being post-poned to after 1.0
* Multiple device handling * Stepping into vkCmdExecuteCommands
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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)));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -257,7 +257,7 @@ void VulkanResourceManager::SerialiseImageStates(map<ResourceId, ImageLayouts> &
|
||||
// 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<VkImage>(liveid));
|
||||
@@ -327,7 +327,6 @@ void VulkanResourceManager::ApplyTransitions(vector< pair<ResourceId, ImageRegio
|
||||
if(nummips == VK_REMAINING_MIP_LEVELS) nummips = states[id].mipLevels;
|
||||
if(numslices == VK_REMAINING_ARRAY_LAYERS) numslices = states[id].arraySize;
|
||||
|
||||
// VKTODOLOW check, does this mean the sensible thing?
|
||||
if(nummips == 0) nummips = 1;
|
||||
if(numslices == 0) numslices = 1;
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ VkResult WrappedVulkan::vkResetCommandPool(
|
||||
VkCmdPool cmdPool,
|
||||
VkCmdPoolResetFlags flags)
|
||||
{
|
||||
// VKTODOMED do I need to serialise this? just a driver hint..
|
||||
return ObjDisp(device)->ResetCommandPool(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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user