From 552dc8fc7ed7a8eff9228421011bb8584d7f707c Mon Sep 17 00:00:00 2001 From: John Kesapides Date: Thu, 13 Jul 2023 17:05:36 +0100 Subject: [PATCH] Fix minimum image size for cl_ext_image_requirements_info Some new extension formats require the width to be a multiple of 4 or 2 (see cl_ext_image_raw10_raw12). Change has not functional impact as the affected image is only used for generic queries. Signed-off-by: John Kesapides --- .../images/kernel_read_write/test_cl_ext_image_buffer.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test_conformance/images/kernel_read_write/test_cl_ext_image_buffer.hpp b/test_conformance/images/kernel_read_write/test_cl_ext_image_buffer.hpp index 56d15808d9..eef811c6e2 100644 --- a/test_conformance/images/kernel_read_write/test_cl_ext_image_buffer.hpp +++ b/test_conformance/images/kernel_read_write/test_cl_ext_image_buffer.hpp @@ -48,8 +48,10 @@ static inline size_t get_format_size(cl_context context, cl_image_desc image_desc = { 0 }; image_desc.image_type = imageType; - /* Size 1 only to query element size */ - image_desc.image_width = 1; + /* We use a width of 4 to query element size, as this is + the smallest possible value that satisfies the requirements + of all image formats (including extensions). */ + image_desc.image_width = 4; if (CL_MEM_OBJECT_IMAGE1D_BUFFER != imageType && CL_MEM_OBJECT_IMAGE1D != imageType) {