mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +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:
1 parent
8b3ae8fd4d
commit
0e9322e610
1 file changed
+8
-1
@@ -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