mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Ensure parentResInfo is always set for all resource types
* This only needs to be different from `this` in the case of image views when using descriptor buffers, so automatically set it to this by default and overwrite only in that case.
This commit is contained in:
@@ -1089,7 +1089,7 @@ struct ResourceInfo
|
||||
// for images this is a self pointer. For image views when we are using descriptor buffers we
|
||||
// can't alias the resInfo in each view's record because each view needs to track its own
|
||||
// descriptors - instead we point back to the image's resInfo here for sparse info. blech
|
||||
ResourceInfo *parentResInfo;
|
||||
ResourceInfo *parentResInfo = this;
|
||||
|
||||
// for buffers, or for images when layouts can affect descriptors, the set of descriptors which
|
||||
// have already been serialised
|
||||
|
||||
@@ -2896,7 +2896,6 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
AddForcedReference(record);
|
||||
|
||||
record->resInfo = new ResourceInfo();
|
||||
record->resInfo->parentResInfo = record->resInfo;
|
||||
ResourceInfo &resInfo = *record->resInfo;
|
||||
resInfo.imageInfo = ImageInfo(*pCreateInfo);
|
||||
|
||||
@@ -3327,6 +3326,8 @@ VkResult WrappedVulkan::vkCreateImageView(VkDevice device, const VkImageViewCrea
|
||||
if(m_DescriptorBuffers)
|
||||
{
|
||||
record->resInfo = new ResourceInfo(*imageRecord->resInfo);
|
||||
// use the image's resinfo for things like sparse records, we only duplicate for descriptor
|
||||
// uniqueness tracking.
|
||||
record->resInfo->parentResInfo = imageRecord->resInfo;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -327,7 +327,6 @@ VkResult WrappedVulkan::vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR
|
||||
record->AddParent(swaprecord);
|
||||
|
||||
record->resInfo = new ResourceInfo();
|
||||
record->resInfo->parentResInfo = record->resInfo;
|
||||
record->resInfo->imageInfo = swaprecord->swapInfo->imageInfo;
|
||||
|
||||
// note we add the chunk to the swap record, that way when the swapchain is created it will
|
||||
|
||||
Reference in New Issue
Block a user