mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-10 07:45:38 +00:00
Don't add STORAGE_BIT to MSAA textures unless it's supported
* Now that we've decoupled MS->Array and Array->MS we might have the former even if the latter is unsupported.
This commit is contained in:
@@ -61,6 +61,7 @@ public:
|
||||
void GetBufferData(ResourceId buff, uint64_t offset, uint64_t len, bytebuf &ret);
|
||||
|
||||
bool IsMS2ArraySupported() { return m_MS2ArrayPipe != VK_NULL_HANDLE; }
|
||||
bool IsArray2MSSupported() { return m_Array2MSPipe != VK_NULL_HANDLE; }
|
||||
void CopyTex2DMSToArray(VkImage destArray, VkImage srcMS, VkExtent3D extent, uint32_t layers,
|
||||
uint32_t samples, VkFormat fmt);
|
||||
void CopyArrayToTex2DMS(VkImage destMS, VkImage srcArray, VkExtent3D extent, uint32_t layers,
|
||||
|
||||
@@ -1497,11 +1497,11 @@ bool WrappedVulkan::Serialise_vkCreateImage(SerialiserType &ser, VkDevice device
|
||||
// to take a slower path that uses drawing
|
||||
if(!IsDepthOrStencilFormat(CreateInfo.format))
|
||||
{
|
||||
// only add STORAGE_BIT if we have an MS2Array pipeline. If it failed to create due to lack
|
||||
// only add STORAGE_BIT if we have an Array2MS pipeline. If it failed to create due to lack
|
||||
// of capability or because we disabled it as a workaround then we don't need this
|
||||
// capability (and it might be the bug we're trying to work around by disabling the
|
||||
// pipeline)
|
||||
if(GetDebugManager()->IsMS2ArraySupported())
|
||||
if(GetDebugManager()->IsArray2MSSupported())
|
||||
CreateInfo.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
}
|
||||
else
|
||||
@@ -1650,7 +1650,7 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
{
|
||||
// need to check the debug manager here since we might be creating this internal image from
|
||||
// its constructor
|
||||
if(GetDebugManager() && GetDebugManager()->IsMS2ArraySupported())
|
||||
if(GetDebugManager() && GetDebugManager()->IsArray2MSSupported())
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user