diff options
author | EdB <[email protected]> | 2015-07-07 17:58:56 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2015-07-16 13:48:20 +0300 |
commit | 7e0180d57d330bd8d3047e841086712376b2a1cc (patch) | |
tree | 4ec25b241c4c176409df496870264e584bbedaf3 /src/gallium/state_trackers/clover/core | |
parent | 7b9ebf879b6f35038996805a641667f00d93c4b7 (diff) |
clover: little OpenCL status code logging clean
s/build_error/compile_error in order to match the stored OpenCL status code.
Make program::build catch and log every OpenCL error.
Make tgsi error triggering uniform with the llvm one.
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/core')
-rw-r--r-- | src/gallium/state_trackers/clover/core/compiler.hpp | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/error.hpp | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/program.cpp | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/clover/core/compiler.hpp b/src/gallium/state_trackers/clover/core/compiler.hpp index c68aa39db85..207641785ca 100644 --- a/src/gallium/state_trackers/clover/core/compiler.hpp +++ b/src/gallium/state_trackers/clover/core/compiler.hpp @@ -37,7 +37,8 @@ namespace clover { const std::string &opts, std::string &r_log); - module compile_program_tgsi(const std::string &source); + module compile_program_tgsi(const std::string &source, + std::string &r_log); } #endif diff --git a/src/gallium/state_trackers/clover/core/error.hpp b/src/gallium/state_trackers/clover/core/error.hpp index 780b973383a..59a5af4c799 100644 --- a/src/gallium/state_trackers/clover/core/error.hpp +++ b/src/gallium/state_trackers/clover/core/error.hpp @@ -65,9 +65,9 @@ namespace clover { cl_int code; }; - class build_error : public error { + class compile_error : public error { public: - build_error(const std::string &what = "") : + compile_error(const std::string &what = "") : error(CL_COMPILE_PROGRAM_FAILURE, what) { } }; diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp index 0d6cc402db7..6eebd9c5cda 100644 --- a/src/gallium/state_trackers/clover/core/program.cpp +++ b/src/gallium/state_trackers/clover/core/program.cpp @@ -56,14 +56,14 @@ program::build(const ref_vector<device> &devs, const char *opts, try { auto module = (dev.ir_format() == PIPE_SHADER_IR_TGSI ? - compile_program_tgsi(_source) : + compile_program_tgsi(_source, log) : compile_program_llvm(_source, headers, dev.ir_format(), dev.ir_target(), build_opts(dev), log)); _binaries.insert({ &dev, module }); _logs.insert({ &dev, log }); - } catch (const build_error &) { + } catch (const error &) { _logs.insert({ &dev, log }); throw; } |