| 1 |
From 25cfdaa4e9dcb4c6e2ef294763c3c4a635ccdd98 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Wenju He <[email protected]> |
| 3 |
Date: Tue, 6 Jan 2026 09:19:26 +0800 |
| 4 |
Subject: [PATCH] [OpenCL] Set cl_khr_gl_msaa_sharing minimum version to 1.0 |
| 5 |
(#174322) |
| 6 |
|
| 7 |
cl_khr_gl_msaa_sharing spec doesn't specify a required OpenCL version. |
| 8 |
|
| 9 |
Make the extension available in all OpenCL versions to avoid spurious |
| 10 |
'unsupported extension' warnings when implementations advertise it |
| 11 |
before 1.2 (e.g., intel compute-runtime 25.13.33276.16). |
| 12 |
|
| 13 |
See also https://github.com/KhronosGroup/OpenCL-CTS/pull/2376. |
| 14 |
--- |
| 15 |
clang/include/clang/Basic/OpenCLExtensions.def | 2 +- |
| 16 |
clang/test/SemaOpenCL/extension-version.cl | 2 +- |
| 17 |
2 files changed, 2 insertions(+), 2 deletions(-) |
| 18 |
|
| 19 |
diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def |
| 20 |
index d322c81b2a49..3abc0279de79 100644 |
| 21 |
--- a/clang/include/clang/Basic/OpenCLExtensions.def |
| 22 |
+++ b/clang/include/clang/Basic/OpenCLExtensions.def |
| 23 |
@@ -68,6 +68,7 @@ OPENCL_OPTIONALCOREFEATURE(cl_khr_fp64, true, 100, OCL_C_12P) |
| 24 |
OPENCL_EXTENSION(cl_khr_fp16, true, 100) |
| 25 |
OPENCL_EXTENSION(cl_khr_int64_base_atomics, true, 100) |
| 26 |
OPENCL_EXTENSION(cl_khr_int64_extended_atomics, true, 100) |
| 27 |
+OPENCL_EXTENSION(cl_khr_gl_msaa_sharing, true, 100) |
| 28 |
OPENCL_GENERIC_EXTENSION(cl_khr_3d_image_writes, true, 100, OCL_C_20, OCL_C_30) |
| 29 |
|
| 30 |
// EMBEDDED_PROFILE |
| 31 |
@@ -75,7 +76,6 @@ OPENCL_EXTENSION(cles_khr_int64, true, 110) |
| 32 |
|
| 33 |
// OpenCL 1.2. |
| 34 |
OPENCL_EXTENSION(cl_khr_depth_images, true, 120) |
| 35 |
-OPENCL_EXTENSION(cl_khr_gl_msaa_sharing,true, 120) |
| 36 |
|
| 37 |
// OpenCL 2.0. |
| 38 |
OPENCL_EXTENSION(cl_ext_float_atomics, false, 200) |
| 39 |
diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl |
| 40 |
index 77531479d3a0..85d7aac0e0f2 100644 |
| 41 |
--- a/clang/test/SemaOpenCL/extension-version.cl |
| 42 |
+++ b/clang/test/SemaOpenCL/extension-version.cl |
| 43 |
@@ -111,7 +111,7 @@ |
| 44 |
#endif |
| 45 |
#pragma OPENCL EXTENSION cles_khr_int64 : enable |
| 46 |
|
| 47 |
-#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
| 48 |
+#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 100) |
| 49 |
#ifndef cl_khr_gl_msaa_sharing |
| 50 |
#error "Missing cl_khr_gl_msaa_sharing define" |
| 51 |
#endif |
| 52 |
-- |
| 53 |
2.39.1 |
| 54 |
|