From 1d092f6b87aa02f1631aa4a7af942299cb00c150 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 29 Oct 2015 18:39:27 +0100 Subject: [PATCH] Remove some VKTODOs that are judged not relevant anymore --- renderdoc/api/replay/vk_pipestate.h | 2 +- renderdoc/driver/vulkan/vk_core.cpp | 1 - renderdoc/driver/vulkan/vk_core.h | 2 -- renderdoc/driver/vulkan/vk_info.h | 2 +- renderdoc/driver/vulkan/vk_initstate.cpp | 17 +++++++++++------ 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/renderdoc/api/replay/vk_pipestate.h b/renderdoc/api/replay/vk_pipestate.h index 85e4431f8..944fa46ac 100644 --- a/renderdoc/api/replay/vk_pipestate.h +++ b/renderdoc/api/replay/vk_pipestate.h @@ -91,7 +91,7 @@ struct VulkanPipelineState struct Binding { Binding() : vbufferBinding(0), bytestride(0), perInstance(false) {} - uint32_t vbufferBinding; // VKTODOLOW I believe this is the meaning + uint32_t vbufferBinding; uint32_t bytestride; bool32 perInstance; }; diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index 86511d293..faa684796 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -771,7 +771,6 @@ bool WrappedVulkan::EndFrameCapture(void *dev, void *wnd) { imInfo.extent.width, imInfo.extent.height, 1 }, }; - // VKTODOLOW back buffer must be in this layout right? VkImageMemoryBarrier bbTrans = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, NULL, 0, 0, VK_IMAGE_LAYOUT_PRESENT_SOURCE_KHR, VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL, diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index 5a1b165cb..436580c5f 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -267,8 +267,6 @@ private: // vkCmd chunks) is NOT unique. // However, a single baked command list can be submitted multiple // times - so we have to have a list of base events - // VKTODOLOW change this to a sorted vector similar to the image - // states // Map from bakeID -> vector map > cmdBufferSubmits; diff --git a/renderdoc/driver/vulkan/vk_info.h b/renderdoc/driver/vulkan/vk_info.h index 67eb0335e..2bc8be023 100644 --- a/renderdoc/driver/vulkan/vk_info.h +++ b/renderdoc/driver/vulkan/vk_info.h @@ -69,7 +69,7 @@ struct VulkanCreationInfo // VkPipelineVertexInputStateCreateInfo struct Binding { - uint32_t vbufferBinding; // VKTODO I believe this is the meaning + uint32_t vbufferBinding; uint32_t bytestride; bool perInstance; }; diff --git a/renderdoc/driver/vulkan/vk_initstate.cpp b/renderdoc/driver/vulkan/vk_initstate.cpp index 1d022471e..d3ec6c578 100644 --- a/renderdoc/driver/vulkan/vk_initstate.cpp +++ b/renderdoc/driver/vulkan/vk_initstate.cpp @@ -397,12 +397,17 @@ void WrappedVulkan::Create_InitialState(ResourceId id, WrappedVkRes *live, bool if(type == eResDescriptorSet) { - // VKTODOMED need to create some default initial state for descriptor sets. - // if a descriptor set is alloc'd then used in frame we won't have prepared anything, - // but likewise all writes must happen within that frame so the initial state doesn't - // technically matter. We assume the app doesn't try to read from an uninitialised - // descriptor, so for now we can leave the initial state empty. - VULKANNOTIMP("Need to create initial state for descriptor set"); + // There is no sensible default for a descriptor set to create. The contents are + // undefined until written to. This means if a descriptor set was alloc'd within a + // frame (the only time we won't have initial contents tracked for it) then the + // contents are undefined, so using whatever is currently in the set is fine. Reading + // from it (and thus getting data from later in the frame potentially) is an error. + // + // Note the same kind of problem applies if a descriptor set is alloc'd before the + // frame and then say slot 5 is never written to until the middle of the frame, then + // used. The initial states we have prepared won't have anything valid for 5 so when + // we apply we won't even write anything into slot 5 - the same case as if we had + // no initial states at all for that descriptor set } else if(type == eResImage) {