diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp index 66159e9f297..f1880827e54 100644 --- a/src/gallium/frontends/clover/core/device.cpp +++ b/src/gallium/frontends/clover/core/device.cpp @@ -30,6 +30,7 @@ #include "util/u_debug.h" #include "spirv/invocation.hpp" #include "nir/invocation.hpp" +#include "nir.h" #include using namespace clover; @@ -359,7 +360,12 @@ device::image_support() const { bool device::has_doubles() const { - return pipe->get_param(pipe, PIPE_CAP_DOUBLES); + nir_shader_compiler_options *options = + (nir_shader_compiler_options *)pipe->get_compiler_options(pipe, + PIPE_SHADER_IR_NIR, + PIPE_SHADER_COMPUTE); + return pipe->get_param(pipe, PIPE_CAP_DOUBLES) && + !(options->lower_doubles_options & nir_lower_fp64_full_software); } bool diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build index 88761db6b2e..0d5cd33f978 100644 --- a/src/gallium/frontends/clover/meson.build +++ b/src/gallium/frontends/clover/meson.build @@ -164,5 +164,5 @@ libclover = static_library( ], gnu_symbol_visibility : 'hidden', link_with : [libclllvm, libclspirv, libclnir], - dependencies : idep_mesautil, + dependencies : [idep_mesautil, idep_nir], )