From e0fd4a47f43b7a50d8928338548219f1165b97f7 Mon Sep 17 00:00:00 2001 From: Kevin Petit Date: Fri, 10 May 2024 16:36:56 +0100 Subject: [PATCH] Add specification for cl_ext_image_unorm_int_2_101010 Change-Id: I51b0ec6f719c30a01637c56047a86d31fd78b7ca --- OpenCL_C.txt | 14 +++++++ api/cl_ext_image_unorm_int_2_101010.asciidoc | 39 ++++++++++++++++++++ api/opencl_runtime_layer.asciidoc | 13 +++++++ c/features.txt | 1 + env/common_properties.asciidoc | 5 +++ xml/cl.xml | 8 +++- 6 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 api/cl_ext_image_unorm_int_2_101010.asciidoc diff --git a/OpenCL_C.txt b/OpenCL_C.txt index 610b54e3c..494245fe3 100644 --- a/OpenCL_C.txt +++ b/OpenCL_C.txt @@ -246,6 +246,12 @@ clock shared by all work-items executing in the same work-group. clock shared by all work-items executing in the same sub-group. endif::cl_khr_kernel_clock[] +ifdef::cl_ext_image_unorm_int_2_101010[] +| {opencl_c_ext_image_unorm_int_2_101010} +| The OpenCL C compiler supports returning `CLK_UNORM_INT_2_101010_EXT` from +`get_image_channel_data_type`. +endif::cl_ext_image_unorm_int_2_101010[] + |==== In OpenCL C 3.0 or newer, feature macros must expand to the value `1` if the @@ -12483,6 +12489,14 @@ endif::cl_khr_gl_msaa_sharing[] `CLK_UNORM_INT_101010_2` footnote:[{fn-CLK_UNORM_INT_101010_2}] +ifdef::cl_ext_image_unorm_int_2_101010[] + Additionally, if the {opencl_c_ext_image_unorm_int_2_101010} feature macro is + supported: + + `CLK_UNORM_INT_2_101010_EXT` + +endif::cl_ext_image_unorm_int_2_101010[] + | int *get_image_channel_order*(_aQual_ image2d_t _image_) + int *get_image_channel_order*(_aQual_ image3d_t _image_) diff --git a/api/cl_ext_image_unorm_int_2_101010.asciidoc b/api/cl_ext_image_unorm_int_2_101010.asciidoc new file mode 100644 index 000000000..1320526df --- /dev/null +++ b/api/cl_ext_image_unorm_int_2_101010.asciidoc @@ -0,0 +1,39 @@ +// Copyright 2020-2024 The Khronos Group Inc. +// SPDX-License-Identifier: CC-BY-4.0 + +include::{generated}/meta/{refprefix}cl_ext_image_unorm_int_2_101010.txt[] + +=== Other Extension Metadata + +*Last Modified Date*:: + 2024-05-10 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Kévin Petit, Arm Ltd. + +=== Description + +{cl_ext_image_unorm_int_2_101010_EXT} adds support for the {CL_UNORM_INT_2_101010_EXT} +image format. + +OpenCL C compilers supporting this extension will define the +{opencl_c_ext_image_unorm_int_2_101010} feature macro. + +=== New feature macro + + * {opencl_c_ext_image_unorm_int_2_101010} + +=== New Enums + + * {cl_channel_type_TYPE} + ** {CL_UNORM_INT_2_101010_EXT} + +=== New OpenCL C channel data type + + * `CLK_UNORM_INT_2_101010_EXT` + +=== Version History + + * Revision 1.0.0, 2024-05-10 + ** Initial version diff --git a/api/opencl_runtime_layer.asciidoc b/api/opencl_runtime_layer.asciidoc index 263ca1854..cef5e7085 100644 --- a/api/opencl_runtime_layer.asciidoc +++ b/api/opencl_runtime_layer.asciidoc @@ -2474,6 +2474,15 @@ include::{generated}/api/version-notes/CL_UNORM_INT_101010_2.asciidoc[] include::{generated}/api/version-notes/CL_SIGNED_INT8.asciidoc[] | Each channel component is an unnormalized signed 8-bit integer value + +ifdef::cl_ext_image_unorm_int_2_101010[] +| {CL_UNORM_INT_2_101010_EXT_anchor} + +include::{generated}/api/version-notes/CL_UNORM_INT_2_101010_EXT.asciidoc[] + | Represents a normalized 2-10-10-10 four-channel ABGR image. + The channel order must be {CL_ABGR}. +endif::cl_ext_image_unorm_int_2_101010[] + | {CL_SIGNED_INT16_anchor} include::{generated}/api/version-notes/CL_SIGNED_INT16.asciidoc[] @@ -2565,6 +2574,10 @@ For {CL_UNORM_INT_101010}, bits 31:30 are undefined, R is in bits 29:20, G in bits 19:10 and B in bits 9:0. For {CL_UNORM_INT_101010_2}, R is in bits 31:22, G in bits 21:12, B in bits 11:2 and A in bits 1:0. +ifdef::cl_ext_image_unorm_int_2_101010[] +For {CL_UNORM_INT_2_101010_EXT}, A is in bits 31:30, B in bits 29:20, G in bits +19:10 and R in bits 9:0. +endif::cl_ext_image_unorm_int_2_101010[] OpenCL implementations must maintain the minimum precision specified by the number of bits in `image_channel_data_type`. diff --git a/c/features.txt b/c/features.txt index b7e636dda..35a649c8c 100644 --- a/c/features.txt +++ b/c/features.txt @@ -18,3 +18,4 @@ __opencl_c_integer_dot_product_input_4x8bit_packed __opencl_c_kernel_clock_scope_device __opencl_c_kernel_clock_scope_work_group __opencl_c_kernel_clock_scope_sub_group +__opencl_c_ext_image_unorm_int_2_101010 diff --git a/env/common_properties.asciidoc b/env/common_properties.asciidoc index 8019b751d..2b732c78c 100644 --- a/env/common_properties.asciidoc +++ b/env/common_properties.asciidoc @@ -384,6 +384,11 @@ channel data types. | *UnormInt101010_2* | {CL_UNORM_INT_101010_2} +ifdef::cl_ext_image_unorm_int_2_101010[] +| 21 +| *UnormInt2_101010EXT* +| {CL_UNORM_INT_2_101010_EXT} +endif::cl_ext_image_unorm_int_2_101010[] |==== [NOTE] diff --git a/xml/cl.xml b/xml/cl.xml index e07843004..d571bb08c 100644 --- a/xml/cl.xml +++ b/xml/cl.xml @@ -1608,7 +1608,8 @@ server's OpenCL/api-docs repository. - + + @@ -7475,5 +7476,10 @@ server's OpenCL/api-docs repository. + + + + +