mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Vulkan: Add ImageLayouts::imageType
The image type is required to correctly handle 3D images accessed through 2D views Change-Id: I18364584413d83c186535f1091226c00d2bbf018
This commit is contained in:
committed by
Baldur Karlsson
parent
bc9f84f61b
commit
08f9a93574
@@ -1329,6 +1329,7 @@ struct ImageLayouts
|
||||
int layerCount, levelCount, sampleCount;
|
||||
VkExtent3D extent;
|
||||
VkFormat format;
|
||||
VkImageType imageType;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ImageLayouts);
|
||||
|
||||
@@ -1464,6 +1464,7 @@ bool WrappedVulkan::Serialise_vkCreateImage(SerialiserType &ser, VkDevice device
|
||||
layouts.levelCount = CreateInfo.mipLevels;
|
||||
layouts.extent = CreateInfo.extent;
|
||||
layouts.format = CreateInfo.format;
|
||||
layouts.imageType = CreateInfo.imageType;
|
||||
|
||||
range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
if(IsDepthOnlyFormat(CreateInfo.format))
|
||||
@@ -1759,6 +1760,7 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
layout->sampleCount = (int)pCreateInfo->samples;
|
||||
layout->extent = pCreateInfo->extent;
|
||||
layout->format = pCreateInfo->format;
|
||||
layout->imageType = pCreateInfo->imageType;
|
||||
|
||||
layout->subresourceStates.clear();
|
||||
|
||||
|
||||
@@ -448,6 +448,7 @@ bool WrappedVulkan::Serialise_vkCreateSwapchainKHR(SerialiserType &ser, VkDevice
|
||||
|
||||
m_ImageLayouts[liveId].extent = iminfo.extent;
|
||||
m_ImageLayouts[liveId].format = iminfo.format;
|
||||
m_ImageLayouts[liveId].imageType = iminfo.type;
|
||||
|
||||
m_ImageLayouts[liveId].subresourceStates.clear();
|
||||
m_ImageLayouts[liveId].subresourceStates.push_back(ImageRegionState(
|
||||
@@ -584,6 +585,7 @@ void WrappedVulkan::WrapAndProcessCreatedSwapchain(VkDevice device,
|
||||
{
|
||||
SCOPED_LOCK(m_ImageLayoutsLock);
|
||||
m_ImageLayouts[imid].format = pCreateInfo->imageFormat;
|
||||
m_ImageLayouts[imid].imageType = VK_IMAGE_TYPE_2D;
|
||||
|
||||
m_ImageLayouts[imid].subresourceStates.clear();
|
||||
m_ImageLayouts[imid].subresourceStates.push_back(ImageRegionState(
|
||||
|
||||
Reference in New Issue
Block a user