const TestCase* vktCase = dynamic_cast<TestCase*>(testCase);
tcu::TestLog& log = m_context.getTestContext().getLog();
vk::SourceCollections sourceProgs;
+ const bool doShaderLog = log.isShaderLoggingEnabled();
DE_UNREF(casePath); // \todo [2015-03-13 pyry] Use this to identify ProgramCollection storage path
{
const vk::ProgramBinary* const binProg = buildProgram<glu::ShaderProgramInfo, vk::GlslSourceCollection::Iterator>(casePath, progIter, m_prebuiltBinRegistry, log, &m_progCollection);
- try
+ if (doShaderLog)
{
- std::ostringstream disasm;
+ try
+ {
+ std::ostringstream disasm;
- vk::disassembleProgram(*binProg, &disasm);
+ vk::disassembleProgram(*binProg, &disasm);
- log << vk::SpirVAsmSource(disasm.str());
- }
- catch (const tcu::NotSupportedError& err)
- {
- log << err;
+ log << vk::SpirVAsmSource(disasm.str());
+ }
+ catch (const tcu::NotSupportedError& err)
+ {
+ log << err;
+ }
}
}
{
const vk::ProgramBinary* const binProg = buildProgram<glu::ShaderProgramInfo, vk::HlslSourceCollection::Iterator>(casePath, progIter, m_prebuiltBinRegistry, log, &m_progCollection);
- try
+ if (doShaderLog)
{
- std::ostringstream disasm;
+ try
+ {
+ std::ostringstream disasm;
- vk::disassembleProgram(*binProg, &disasm);
+ vk::disassembleProgram(*binProg, &disasm);
- log << vk::SpirVAsmSource(disasm.str());
- }
- catch (const tcu::NotSupportedError& err)
- {
- log << err;
+ log << vk::SpirVAsmSource(disasm.str());
+ }
+ catch (const tcu::NotSupportedError& err)
+ {
+ log << err;
+ }
}
}
throw LogWriteFailedError();
}
+bool TestLog::isShaderLoggingEnabled (void)
+{
+ return (qpTestLog_getLogFlags(m_log) & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) == 0;
+}
+
const TestLog::BeginMessageToken TestLog::Message = TestLog::BeginMessageToken();
const TestLog::EndMessageToken TestLog::EndMessage = TestLog::EndMessageToken();
const TestLog::EndImageSetToken TestLog::EndImageSet = TestLog::EndImageSetToken();