From af09db6e588e694c62ad2c2530b6570ef9765c07 Mon Sep 17 00:00:00 2001 From: Pierre Moreau Date: Thu, 12 Nov 2020 12:01:14 +0100 Subject: [PATCH] clover: Advertise cl_khr_il_program v2: * Change the code to avoid the macro (Karol Herbst, Francisco Jerez); * Update the code to add a `cl_name_version`. Reviewed-by: Francisco Jerez Signed-off-by: Pierre Moreau Part-of: --- src/gallium/frontends/clover/api/platform.cpp | 3 +++ src/gallium/frontends/clover/core/device.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/frontends/clover/api/platform.cpp b/src/gallium/frontends/clover/api/platform.cpp index fdffa321aca..f9b90dfb556 100644 --- a/src/gallium/frontends/clover/api/platform.cpp +++ b/src/gallium/frontends/clover/api/platform.cpp @@ -204,6 +204,9 @@ ext_funcs = { // cl_khr_icd { "clIcdGetPlatformIDsKHR", reinterpret_cast(IcdGetPlatformIDsKHR) }, + + // cl_khr_il_program + { "clCreateProgramWithILKHR", reinterpret_cast(CreateProgramWithILKHR) }, }; } // anonymous namespace diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp index 2390ee58f5e..f2b7e65d13d 100644 --- a/src/gallium/frontends/clover/core/device.cpp +++ b/src/gallium/frontends/clover/core/device.cpp @@ -367,6 +367,9 @@ device::supported_extensions() const { vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_khr_fp16" } ); if (svm_support()) vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_arm_shared_virtual_memory" } ); + if (!clover::spirv::supported_versions().empty() && + supports_ir(PIPE_SHADER_IR_NIR_SERIALIZED)) + vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_khr_il_program" } ); return vec; }