mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Enable shaderStorageImageMultisample at capture time for MSAA stores
* We need this to be able to add STORAGE_BIT to the image even if we don't do MSAA stores at capture time
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
void VulkanDebugManager::CopyTex2DMSToArray(VkImage destArray, VkImage srcMS, VkExtent3D extent,
|
||||
uint32_t layers, uint32_t samples, VkFormat fmt)
|
||||
{
|
||||
if(!m_pDriver->GetDeviceEnabledFeatures().shaderStorageImageWriteWithoutFormat)
|
||||
if(!m_pDriver->GetDeviceEnabledFeatures().shaderStorageImageWriteWithoutFormat ||
|
||||
!m_pDriver->GetDeviceEnabledFeatures().shaderStorageImageMultisample)
|
||||
return;
|
||||
|
||||
if(m_MS2ArrayPipe == VK_NULL_HANDLE)
|
||||
|
||||
@@ -3559,6 +3559,15 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice,
|
||||
"shaderStorageImageWriteWithoutFormat = false, multisampled textures will have empty "
|
||||
"contents at frame start.");
|
||||
|
||||
// even though we don't actually do any multisampled stores, this is needed to be able to create
|
||||
// MSAA images with STORAGE_BIT usage
|
||||
if(availFeatures.shaderStorageImageMultisample)
|
||||
enabledFeatures.shaderStorageImageMultisample = true;
|
||||
else
|
||||
RDCWARN(
|
||||
"shaderStorageImageMultisample = false, multisampled textures will have empty "
|
||||
"contents at frame start.");
|
||||
|
||||
// patch the enabled features
|
||||
if(enabledFeatures2)
|
||||
enabledFeatures2->features = enabledFeatures;
|
||||
|
||||
Reference in New Issue
Block a user