From 97c48edac07763a78cfeff975d1a88d5ff9a3cf8 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 1 Jun 2023 21:37:49 +0200 Subject: [PATCH] rusticl/device: limit MAX_PARAMETER_SIZE to 32k There is no good reason of having it too big and radeonsi returns an absurd high value through PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE. This speeds up the CTS testing this device limit. Signed-off-by: Karol Herbst Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/rusticl/core/device.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index e2742d1a5b6..7bee316d898 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -782,7 +782,10 @@ impl Device { } pub fn param_max_size(&self) -> usize { - self.shader_param(pipe_shader_cap::PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE) as usize + min( + self.shader_param(pipe_shader_cap::PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE), + 32 * 1024, + ) as usize } pub fn printf_buffer_size(&self) -> usize {