diff options
author | Timothy Arceri <[email protected]> | 2018-02-09 12:03:57 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-10 10:59:10 +1100 |
commit | 51f484bb44f2341d41dbce964d76549cd1a045cb (patch) | |
tree | b1f698380312698dbc1adce6473b86f131c680b5 /src/gallium/state_trackers | |
parent | 3af4f34e6113c3a8b4f62379127ab475de716056 (diff) |
clover: use PIPE_SHADER_CAP_SUPPORTED_IRS to discover IR
PIPE_SHADER_CAP_PREFERRED_IR was conflicting with PIPE_SHADER_IR_NIR
for compute shaders, so we let clover pick the one it wants to use.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 9dd7eed3f17..71cf4bf60af 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -243,8 +243,15 @@ device::vendor_name() const { enum pipe_shader_ir device::ir_format() const { - return (enum pipe_shader_ir) pipe->get_shader_param( - pipe, PIPE_SHADER_COMPUTE, PIPE_SHADER_CAP_PREFERRED_IR); + int supported_irs = + pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE, + PIPE_SHADER_CAP_SUPPORTED_IRS); + + if (supported_irs & (1 << PIPE_SHADER_IR_NATIVE)) { + return PIPE_SHADER_IR_NATIVE; + } + + return PIPE_SHADER_IR_TGSI; } std::string |