static inline binary
link_program(const std::vector<binary> &bs, const device &dev,
const std::string &opts, std::string &log) {
- const bool create_library =
- opts.find("-create-library") != std::string::npos;
switch (dev.ir_format()) {
+#ifdef HAVE_CLOVER_SPIRV
case PIPE_SHADER_IR_NIR_SERIALIZED: {
+ const bool create_library =
+ opts.find("-create-library") != std::string::npos;
auto spirv_linked_module = spirv::link_program(bs, dev, opts, log);
if (create_library)
return spirv_linked_module;
return nir::spirv_to_nir(spirv_linked_module,
dev, log);
}
+#endif
case PIPE_SHADER_IR_NATIVE:
return llvm::link_program(bs, dev, opts, log);
default:
#include "core/platform.hpp"
#include "pipe/p_screen.h"
#include "pipe/p_state.h"
-#include "spirv/invocation.hpp"
#include "util/bitscan.h"
+#include "util/disk_cache.h"
#include "util/u_debug.h"
-#include "spirv/invocation.hpp"
-#include "nir/invocation.hpp"
#include "nir.h"
#include <fstream>
+#ifdef HAVE_CLOVER_SPIRV
+#include "spirv/invocation.hpp"
+#include "nir/invocation.hpp"
+#endif
+
using namespace clover;
namespace {
vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_khr_fp16" } );
if (svm_support())
vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_arm_shared_virtual_memory" } );
+#ifdef HAVE_CLOVER_SPIRV
if (!clover::spirv::supported_versions().empty() &&
supports_ir(PIPE_SHADER_IR_NIR_SERIALIZED))
vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_khr_il_program" } );
+#endif
vec.push_back( cl_name_version{ CL_MAKE_VERSION(1, 0, 0), "cl_khr_extended_versioning" } );
return vec;
}
std::vector<cl_name_version>
device::supported_il_versions() const {
+#ifdef HAVE_CLOVER_SPIRV
return clover::spirv::supported_versions();
+#else
+ return {};
+#endif
}
const void *