Mesa (master): clover: List supported ILs versions

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


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

Author: Pierre Moreau <dev at pmoreau.org>
Date:   Thu Nov 12 20:38:18 2020 +0100

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 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/core/device.cpp | 6 ++++++
 src/gallium/frontends/clover/core/device.hpp | 1 +
 2 files changed, 7 insertions(+)

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;
 



More information about the mesa-commit mailing list