From 07272f6c359968980af4dd3fc67ccf3b2e3d0c95 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Tue, 22 Aug 2023 19:37:52 +0200 Subject: [PATCH] rusticl/device: _MAX_CONST_BUFFER0_SIZE is unsigned Part-of: --- src/gallium/frontends/rusticl/core/device.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 }