From c7a357787f27121c4fe4c253a1cb4c0c4640b867 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 4 Feb 2022 01:13:52 -0800 Subject: [PATCH] anv: Increase maxUniformBufferRange to 2^30 when not using the sampler The limit here is from the RENDER_SURFACE_STATE height/width/depth fields - it's 2^30 for ISL_FORMAT_RAW buffers, and 2^27 otherwise. anv_isl_format_for_descriptor_type() uses ISL_FORMAT_R32G32B32A32_FLOAT for uniform buffers when compiler->indirect_ubos_use_sampler is set (Icelake and earlier), but ISL_FORMAT_RAW when it isn't (Tigerlake+). So we can increase the limit on Tigerlake and later. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index cbb77b32d84..d86dd90adfe 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1826,7 +1826,7 @@ void anv_GetPhysicalDeviceProperties( .maxImageDimensionCube = (1 << 14), .maxImageArrayLayers = (1 << 11), .maxTexelBufferElements = 128 * 1024 * 1024, - .maxUniformBufferRange = (1ul << 27), + .maxUniformBufferRange = pdevice->compiler->indirect_ubos_use_sampler ? (1u << 27) : (1u << 30), .maxStorageBufferRange = pdevice->isl_dev.max_buffer_size, .maxPushConstantsSize = MAX_PUSH_CONSTANTS_SIZE, .maxMemoryAllocationCount = UINT32_MAX,