summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Moreau <dev@pmoreau.org>2020-11-12 20:38:18 +0100
committerPierre Moreau <dev@pmoreau.org>2021-01-01 21:56:58 +0100
commit7b1659173ac56cd95498b2132e216a6a6309a88c (patch)
tree61bb228bce3b257c5b0c9b697061c8f4cc58bef5
parentc0d4d21ff5db14f9caeecb85fff4f92844c27630 (diff)
clover: List supported ILs versions
v2: * Change the existing method to return a `std::vector<cl_name_version`; * Add a string function that uses the previous method but returns a `std::string`. v3: * Remove `supported_il_versions_as_string()` (Francisco Jerez) 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/core/device.cpp6
-rw-r--r--src/gallium/frontends/clover/core/device.hpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp
index 4e9268eb3e9..2390ee58f5e 100644
--- a/src/gallium/frontends/clover/core/device.cpp
+++ b/src/gallium/frontends/clover/core/device.cpp
@@ -25,6 +25,7 @@
#include "core/platform.hpp"
#include "pipe/p_screen.h"
#include "pipe/p_state.h"
+#include "spirv/invocation.hpp"
#include "util/bitscan.h"
#include "util/u_debug.h"
#include "spirv/invocation.hpp"
@@ -385,6 +386,11 @@ device::supported_extensions_as_string() const {
return extensions_string;
}
+std::vector<cl_name_version>
+device::supported_il_versions() const {
+ return clover::spirv::supported_versions();
+}
+
const void *
device::get_compiler_options(enum pipe_shader_ir ir) const {
return pipe->get_compiler_options(pipe, ir, PIPE_SHADER_COMPUTE);
diff --git a/src/gallium/frontends/clover/core/device.hpp b/src/gallium/frontends/clover/core/device.hpp
index 5cf3b6dc6b6..d06737c1485 100644
--- a/src/gallium/frontends/clover/core/device.hpp
+++ b/src/gallium/frontends/clover/core/device.hpp
@@ -96,6 +96,7 @@ namespace clover {
cl_version device_clc_version() const;
std::vector<cl_name_version> opencl_c_all_versions() const;
std::vector<cl_name_version> supported_extensions() const;
+ std::vector<cl_name_version> supported_il_versions() const;
std::vector<cl_name_version> opencl_c_features() const;