Signed-off-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com>
---
 src/intel/vulkan/anv_formats.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index 9c52ad5acbd..324797b7f10 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -842,6 +842,10 @@ anv_get_image_format_properties(
        */
    }
 
+   /* Pre-gen9 has a 2 GB limitation of the size in bytes */
+   uint64_t maxResourceSize =
+      devinfo->gen < 9 ? (uint64_t)( 1 << 31 ) : UINT32_MAX;
+
    *pImageFormatProperties = (VkImageFormatProperties) {
       .maxExtent = maxExtent,
       .maxMipLevels = maxMipLevels,
@@ -851,7 +855,7 @@ anv_get_image_format_properties(
       /* FINISHME: Accurately calculate
        * VkImageFormatProperties::maxResourceSize.
        */
-      .maxResourceSize = UINT32_MAX,
+      .maxResourceSize = maxResourceSize,
    };
 
    if (pYcbcrImageFormatProperties) {
-- 
2.14.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to