summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Moreau <dev@pmoreau.org>2020-11-12 12:01:14 +0100
committerPierre Moreau <dev@pmoreau.org>2021-01-01 21:56:58 +0100
commitaf09db6e588e694c62ad2c2530b6570ef9765c07 (patch)
treea8ad1013aebd288be6ea8f1ece4e4196a77f85bd
parent31ce49e6b2ef473e5083e0c04ab8d53ad863dda2 (diff)
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@riseup.net> Signed-off-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
-rw-r--r--src/gallium/frontends/clover/api/platform.cpp3
-rw-r--r--src/gallium/frontends/clover/core/device.cpp3
2 files changed, 6 insertions, 0 deletions
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;
}