Log SPIR-V assembly source.
We weren't previously logging the source of a SPIR-V module, which made
it hard to debug compilation errors.
Extend executor to handle the new XML element.
Bump the log-format version to 0.3.4.
Change-Id: I4ace0a88820d08febd0500c60d1f2fe97b635635
diff --git a/executor/xeTestResultParser.cpp b/executor/xeTestResultParser.cpp
index 0b95b8e..eba5ffd 100644
--- a/executor/xeTestResultParser.cpp
+++ b/executor/xeTestResultParser.cpp
@@ -115,6 +115,7 @@
{ 0x6c1415d9, "ComputeShader", ri::TYPE_SHADER },
{ 0x72863a54, "ShaderProgram", ri::TYPE_SHADERPROGRAM },
{ 0xb4efc08d, "ShaderSource", ri::TYPE_SHADERSOURCE },
+ { 0xaee4380a, "SpirVAssemblySource", ri::TYPE_SPIRVSOURCE },
{ 0xff265913, "InfoLog", ri::TYPE_INFOLOG },
{ 0x84159b73, "EglConfig", ri::TYPE_EGLCONFIG },
{ 0xdd34391f, "EglConfigSet", ri::TYPE_EGLCONFIGSET },
@@ -545,7 +546,7 @@
case ri::TYPE_SHADER:
{
if (parentType != ri::TYPE_SHADERPROGRAM)
- throw TestResultParseError("<VertexShader> outside of <ShaderProgram>");
+ throw TestResultParseError(string("<") + elemName + "> outside of <ShaderProgram>");
ri::Shader* shader = curList->allocItem<ri::Shader>();
@@ -556,6 +557,14 @@
break;
}
+ case ri::TYPE_SPIRVSOURCE:
+ {
+ if (parentType != ri::TYPE_SHADERPROGRAM)
+ throw TestResultParseError(string("<") + elemName + "> outside of <ShaderProgram>");
+ item = curList->allocItem<ri::SpirVSource>();
+ break;
+ }
+
case ri::TYPE_SHADERSOURCE:
if (parentType == ri::TYPE_SHADER)
item = &static_cast<ri::Shader*>(parentItem)->source;
@@ -776,6 +785,10 @@
m_xmlParser.appendDataStr(static_cast<ri::ShaderSource*>(curItem)->source);
break;
+ case ri::TYPE_SPIRVSOURCE:
+ m_xmlParser.appendDataStr(static_cast<ri::SpirVSource*>(curItem)->source);
+ break;
+
case ri::TYPE_INFOLOG:
m_xmlParser.appendDataStr(static_cast<ri::InfoLog*>(curItem)->log);
break;