rusticl: fix MemConstant invalid arg size check
authorItalo Nicola <italonicola@collabora.com>
Sun, 7 Aug 2022 13:30:19 +0000 (13:30 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Oct 2022 16:34:56 +0000 (16:34 +0000)
As a memory object, the MemConstant check should be the same as
MemGlobal.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19352>

src/gallium/frontends/rusticl/api/kernel.rs

index d635829..2e793a8 100644 (file)
@@ -240,7 +240,7 @@ pub fn set_kernel_arg(
                     return Err(CL_INVALID_ARG_SIZE);
                 }
             }
-            KernelArgType::MemGlobal => {
+            KernelArgType::MemGlobal | KernelArgType::MemConstant => {
                 if arg_size != std::mem::size_of::<cl_mem>() {
                     return Err(CL_INVALID_ARG_SIZE);
                 }