From b33635bbe7ddcd8baf1bd1d442b4bc42c889766d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 2 Jun 2026 14:19:58 +0300 Subject: [PATCH] iris: align down the max_shader_buffer_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes many failing CTS tests in following set: KHR-Single-GL46.enhanced_layouts.ssb_member_invalid_offset* See commit e58dcc47c3b that made the same change for radeonsi. Fixes: 1eb4a2f5cd5 ("iris: Limit max_shader_buffer_size to INT32_MAX") Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 8d0628d248e..140f012747e 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -394,7 +394,7 @@ iris_init_screen_caps(struct iris_screen *screen) caps->constant_buffer_offset_alignment = 32; caps->min_map_buffer_alignment = IRIS_MAP_BUFFER_ALIGNMENT; caps->shader_buffer_offset_alignment = 4; - caps->max_shader_buffer_size = (unsigned)MIN2(screen->isl_dev.max_buffer_size, INT32_MAX); // INT32_MAX is correct. + caps->max_shader_buffer_size = ROUND_DOWN_TO((unsigned)MIN2(screen->isl_dev.max_buffer_size, INT32_MAX), 256); caps->texture_buffer_offset_alignment = 16; // XXX: u_screen says 256 is the minimum value... caps->linear_image_pitch_alignment = 1; caps->linear_image_base_address_alignment = 1;