From: Pierre Moreau Date: Tue, 5 May 2020 11:14:26 +0000 (+0200) Subject: clover/spirv: Print linked SPIR-V module if asked X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec6bad140b780aaa10f7c02c8e2eb46f12671d4d;p=mesa.git clover/spirv: Print linked SPIR-V module if asked Signed-off-by: Pierre Moreau Reviewed-by: Serge Martin Reviewed-by: Karol Herbst Reviewed-by: Francisco Jerez Part-of: --- diff --git a/src/gallium/frontends/clover/spirv/invocation.cpp b/src/gallium/frontends/clover/spirv/invocation.cpp index 2adfc668f99..e4b1565288f 100644 --- a/src/gallium/frontends/clover/spirv/invocation.cpp +++ b/src/gallium/frontends/clover/spirv/invocation.cpp @@ -654,6 +654,9 @@ clover::spirv::link_program(const std::vector &modules, if (!is_valid_spirv(final_binary, opencl_version, r_log)) throw error(CL_LINK_PROGRAM_FAILURE); + if (has_flag(llvm::debug::spirv)) + llvm::debug::log(".spvasm", spirv::print_module(final_binary, dev.device_version())); + for (const auto &mod : modules) m.syms.insert(m.syms.end(), mod.syms.begin(), mod.syms.end());