Don't return 0-byte BlockShape for error case

* This can lead to divide-by-zero errors, instead return 1x1 1 byte block as a
  relatively sane default.
This commit is contained in:
baldurk
2019-03-25 16:54:12 +00:00
parent b738a466b3
commit 7b71c7fb3d
+1 -1
View File
@@ -1543,7 +1543,7 @@ BlockShape GetBlockShape(VkFormat Format, uint32_t plane)
default: RDCERR("Unrecognised Vulkan Format: %d", Format);
}
return BlockShape();
return {1, 1, 1};
}
VkExtent2D GetPlaneShape(uint32_t Width, uint32_t Height, VkFormat Format, uint32_t plane)