diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index 34e23a656da..aeaba5326bb 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -304,10 +304,11 @@ impl Device { // CL_DEVICE_MAX_PARAMETER_SIZE // For this minimum value, only a maximum of 128 arguments can be passed to a kernel - if screen.shader_param( + if (screen.shader_param( pipe_shader_type::PIPE_SHADER_COMPUTE, pipe_shader_cap::PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE, - ) < 128 + ) as u32) + < 128 { return false; } @@ -840,7 +841,7 @@ impl Device { pub fn param_max_size(&self) -> usize { min( - self.shader_param(pipe_shader_cap::PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE), + self.shader_param(pipe_shader_cap::PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE) as u32, 32 * 1024, ) as usize }