From 4999f9995ee7b3e73aba3eb88129b99372f1d2b0 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sun, 18 Jun 2023 18:30:57 +0200 Subject: [PATCH] rusticl/mem: fix validation of packed image formats Signed-off-by: Karol Herbst Reviewed-by: Dave Airlie Reviewed-by: Nora Allen Part-of: --- src/gallium/frontends/rusticl/api/memory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/rusticl/api/memory.rs b/src/gallium/frontends/rusticl/api/memory.rs index d611a3c..eab661c 100644 --- a/src/gallium/frontends/rusticl/api/memory.rs +++ b/src/gallium/frontends/rusticl/api/memory.rs @@ -379,9 +379,9 @@ fn validate_image_format<'a>( // special validation let valid_combination = match format.image_channel_data_type { CL_UNORM_SHORT_565 | CL_UNORM_SHORT_555 | CL_UNORM_INT_101010 => { - [CL_RGB, CL_RGBx].contains(&format.image_channel_data_type) + [CL_RGB, CL_RGBx].contains(&format.image_channel_order) } - CL_UNORM_INT_101010_2 => format.image_channel_data_type == CL_RGBA, + CL_UNORM_INT_101010_2 => format.image_channel_order == CL_RGBA, _ => true, }; if !valid_combination { -- 2.7.4