Vulkan: Lift unmotivated restriction on texture size

This commit is contained in:
Henrik Rydgård 2023-12-15 10:47:51 +01:00
parent 43a2af46ee
commit 06ba0027c7

View file

@ -42,7 +42,8 @@ bool VulkanTexture::CreateDirect(VkCommandBuffer cmd, int w, int h, int depth, i
ERROR_LOG(G3D, "Can't create a zero-size VulkanTexture");
return false;
}
if (w > 4096 || h > 4096) {
int maxDim = vulkan_->GetPhysicalDeviceProperties(0).properties.limits.maxImageDimension2D;
if (w > maxDim || h > maxDim) {
ERROR_LOG(G3D, "Can't create a texture this large");
return false;
}