From fda1262eedae057c715eba6a64b9d056aa41e678 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 29 Oct 2025 17:31:01 +0100 Subject: [PATCH] radv: reduce maxTexelBufferElements to 1<<29 It's the number of elements. RADV exposes VK_FORMAT_R64_{UINT,SINT} formats for texel buffers, so the maximum is 1<<29 to fit in the 32-bit bounds checking. Fixes KHR-GL46.texture_buffer_size_clamping.* with Zink and new VKCTS dEQP-VK.texture.misc.max_elements.*. Cc: mesa-stable. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_physical_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index b4e5c46b37c..ce83bf02635 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -1616,7 +1616,7 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev) MIN3(pdev->image_props.max_dims.width, pdev->image_props.max_dims.height, pdev->image_props.max_dims.depth), .maxImageDimensionCube = MIN2(pdev->image_props.max_dims.width, pdev->image_props.max_dims.height), .maxImageArrayLayers = pdev->image_props.max_array_layers, - .maxTexelBufferElements = UINT32_MAX, + .maxTexelBufferElements = 512 * 1024 * 1024, .maxUniformBufferRange = UINT32_MAX, .maxStorageBufferRange = UINT32_MAX, .maxPushConstantsSize = MAX_PUSH_CONSTANTS_SIZE,