From 00fc927e52cf9dcbfadb9e3d6c44475ea1cc0742 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 22 Mar 2023 13:39:42 +0200 Subject: [PATCH] anv: take care of maxStorageBufferRange being uint32_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Not fixing anything, but required for another fix. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_device.c | 2 +- src/intel/vulkan_hasvk/anv_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 8a5e157..e2c9d0e 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1642,7 +1642,7 @@ void anv_GetPhysicalDeviceProperties( .maxImageArrayLayers = (1 << 11), .maxTexelBufferElements = 128 * 1024 * 1024, .maxUniformBufferRange = pdevice->compiler->indirect_ubos_use_sampler ? (1u << 27) : (1u << 30), - .maxStorageBufferRange = pdevice->isl_dev.max_buffer_size, + .maxStorageBufferRange = MIN2(pdevice->isl_dev.max_buffer_size, UINT32_MAX), .maxPushConstantsSize = MAX_PUSH_CONSTANTS_SIZE, .maxMemoryAllocationCount = UINT32_MAX, .maxSamplerAllocationCount = 64 * 1024, diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c index 5775a0d..9010819 100644 --- a/src/intel/vulkan_hasvk/anv_device.c +++ b/src/intel/vulkan_hasvk/anv_device.c @@ -1642,7 +1642,7 @@ void anv_GetPhysicalDeviceProperties( .maxImageArrayLayers = (1 << 11), .maxTexelBufferElements = 128 * 1024 * 1024, .maxUniformBufferRange = pdevice->compiler->indirect_ubos_use_sampler ? (1u << 27) : (1u << 30), - .maxStorageBufferRange = pdevice->isl_dev.max_buffer_size, + .maxStorageBufferRange = MIN2(pdevice->isl_dev.max_buffer_size, UINT32_MAX), .maxPushConstantsSize = MAX_PUSH_CONSTANTS_SIZE, .maxMemoryAllocationCount = UINT32_MAX, .maxSamplerAllocationCount = 64 * 1024, -- 2.7.4