From 06ba0027c79cac686ce08aa671f0e256532b915b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 15 Dec 2023 10:47:51 +0100 Subject: [PATCH] Vulkan: Lift unmotivated restriction on texture size --- Common/GPU/Vulkan/VulkanImage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/GPU/Vulkan/VulkanImage.cpp b/Common/GPU/Vulkan/VulkanImage.cpp index cc498c938715..d3dce6356a15 100644 --- a/Common/GPU/Vulkan/VulkanImage.cpp +++ b/Common/GPU/Vulkan/VulkanImage.cpp @@ -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; }