[Mesa-dev] [RFC PATCH 12/17] clover: Refuse to compile source code to SPIR-V
Pierre Moreau
pierre.morrow at free.fr
Wed May 3 21:57:00 UTC 2017
Creating a program using clCreateProgramWithSource to SPIR-V requires a
non-upstreamed version of LLVM and clang, therefore it is currently not
supported.
Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---
src/gallium/state_trackers/clover/core/program.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp
index ae4b50a879..15d559cd93 100644
--- a/src/gallium/state_trackers/clover/core/program.cpp
+++ b/src/gallium/state_trackers/clover/core/program.cpp
@@ -51,6 +51,10 @@ program::compile(const ref_vector<device> &devs, const std::string &opts,
std::string log;
try {
+ if (dev.ir_format() == PIPE_SHADER_IR_SPIRV) {
+ log = "Compiling from source to SPIR-V is not supported yet\n";
+ throw error(CL_INVALID_DEVICE);
+ }
const module m = (dev.ir_format() == PIPE_SHADER_IR_TGSI ?
tgsi::compile_program(_source, log) :
llvm::compile_program(_source, headers,
--
2.12.2
More information about the mesa-dev
mailing list