diff options
author | Pierre Moreau <[email protected]> | 2017-10-03 21:07:45 +0200 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-02-26 21:02:07 +0100 |
commit | 505ec3a530f1ffd85f384cda9a472a0bae56c8e4 (patch) | |
tree | 01d57da786501f9d35a5fac688568186ca9542a1 /src/gallium | |
parent | 67769c913f2e1608530779be207bcb1eb46f3a90 (diff) |
clover: Add an helper for checking if an IR is supported
Reviewed-by: Aaron Watry <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.cpp | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.hpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 1fae465dae4..010bae81403 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -272,3 +272,9 @@ device::device_clc_version() const { debug_get_option("CLOVER_DEVICE_CLC_VERSION_OVERRIDE", "1.1"); return device_clc_version; } + +bool +device::supports_ir(enum pipe_shader_ir ir) const { + return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE, + PIPE_SHADER_CAP_SUPPORTED_IRS) & (1 << ir); +} diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp index 85cd031676d..ebe15f28e93 100644 --- a/src/gallium/state_trackers/clover/core/device.hpp +++ b/src/gallium/state_trackers/clover/core/device.hpp @@ -82,6 +82,7 @@ namespace clover { enum pipe_shader_ir ir_format() const; std::string ir_target() const; enum pipe_endian endianness() const; + bool supports_ir(enum pipe_shader_ir ir) const; friend class command_queue; friend class root_resource; |