mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-20 20:55:42 +00:00
Skip incompatible image formats when building discard pattern
If the pattern's dimensions are not an integer multiple of the format's block size, then do not attempt to create the discard pattern, just exit early. Fixes 3466
This commit is contained in:
committed by
Baldur Karlsson
parent
8b3ae8fd4d
commit
0e9322e610
@@ -2381,9 +2381,16 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
|
||||
if(buf == VK_NULL_HANDLE)
|
||||
{
|
||||
GPUBuffer &stage = m_DiscardStage[key];
|
||||
bytebuf pattern = GetDiscardPattern(key.second, MakeResourceFormat(key.first));
|
||||
|
||||
BlockShape shape = GetBlockShape(key.first, 0);
|
||||
if((PatternBatchWidth % shape.width) != 0 || (PatternBatchHeight % shape.height) != 0)
|
||||
{
|
||||
RDCWARN("Skipping discard pattern for %s as block size is incompatible (%d * %d)",
|
||||
ToStr(MakeResourceFormat(key.first).type).c_str(), shape.width, shape.height);
|
||||
return;
|
||||
}
|
||||
|
||||
bytebuf pattern = GetDiscardPattern(key.second, MakeResourceFormat(key.first));
|
||||
|
||||
if(key.first == VK_FORMAT_D32_SFLOAT_S8_UINT)
|
||||
shape = {1, 1, 4};
|
||||
|
||||
Reference in New Issue
Block a user