Mesa (master): clover: Advertise cl_khr_il_program

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 1 22:28:34 UTC 2021


Module: Mesa
Branch: master
Commit: af09db6e588e694c62ad2c2530b6570ef9765c07
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=af09db6e588e694c62ad2c2530b6570ef9765c07

Author: Pierre Moreau <dev at pmoreau.org>
Date:   Thu Nov 12 12:01:14 2020 +0100

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 <currojerez at riseup.net>
Signed-off-by: Pierre Moreau <dev at pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

---

 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<void *>(IcdGetPlatformIDsKHR) },
+
+   // cl_khr_il_program
+   { "clCreateProgramWithILKHR", reinterpret_cast<void *>(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;
 }
 



More information about the mesa-commit mailing list