summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-01-14 16:10:20 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-01-15 15:21:15 +0100
commit2aa7ad5e6716ac01b2b43fa68e4b5d50aaf00944 (patch)
tree5a6167f705aa942309cce6b7046e867d3147dd4c
parentade24763c74ce506276218ec1ce0e307301717fe (diff)
qvkgen: Skip command elements with alias
Otherwise we end up with generating broken qvulkanfunctions cpp and h files. For example, encountering the following command element should lead to taking no action, this is not something we want to emit a corresponding wrapper function for: <command name="vkResetQueryPoolEXT" alias="vkResetQueryPool"/> This is required to be able to upgrade the bundled vk.xml to something newer. Fixes: QTBUG-90330 Task-number: QTBUG-90219 Change-Id: Ie6e3a8794207e30a172820eb055238bf52a0c0b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/tools/qvkgen/qvkgen.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/qvkgen/qvkgen.cpp b/src/tools/qvkgen/qvkgen.cpp
index 0664f6f5db..8135678fe1 100644
--- a/src/tools/qvkgen/qvkgen.cpp
+++ b/src/tools/qvkgen/qvkgen.cpp
@@ -104,8 +104,11 @@ void VkSpecParser::parseCommands()
m_reader.readNext();
if (m_reader.isEndElement() && m_reader.name() == QStringLiteral("commands"))
return;
- if (m_reader.isStartElement() && m_reader.name() == u"command")
- m_commands.append(parseCommand());
+ if (m_reader.isStartElement() && m_reader.name() == u"command") {
+ const Command c = parseCommand();
+ if (!c.cmd.name.isEmpty()) // skip aliases
+ m_commands.append(c);
+ }
}
}