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 <marek.olsak@amd.com>
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