diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 8a5e1574814..e2c9d0eba0f 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 5775a0dd60f..9010819b1e1 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,