From aaf64f1edf58f7d295770fe6c056c66578ab44a4 Mon Sep 17 00:00:00 2001 From: James Sumihiro Date: Wed, 25 Sep 2024 13:43:26 -0700 Subject: [PATCH] Fix uninitialized reftype during image state merge The reftype of a merged subresource state is now initialized with the reftype of the original subresource state This resolves an issue that could occur if image states in a secondary command buffer were merged into a primary for the first time, where the resulting merged image state would have an uninitialized reftype --- renderdoc/driver/vulkan/vk_image_states.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_image_states.cpp b/renderdoc/driver/vulkan/vk_image_states.cpp index 48624f899..c71079c46 100644 --- a/renderdoc/driver/vulkan/vk_image_states.cpp +++ b/renderdoc/driver/vulkan/vk_image_states.cpp @@ -50,6 +50,9 @@ void ImageSubresourceState::Update(const ImageSubresourceState &other, FrameRefC if(other.newLayout != UNKNOWN_PREV_IMG_LAYOUT) newLayout = other.newLayout; + if(refType == eFrameRef_Unknown) + refType = other.refType; + refType = compose(refType, other.refType); }