Skip to content

Commit 190f081

Browse files
committed
Fix terraintessellation example
Fix compilation error: no matching function for call to ‘vk::Device::getQueryPoolResults<uint64_t>(vk::QueryPool&, int, int, std::array<long unsigned int, 2>&, long unsigned int, vk::QueryResultFlagBits) const’ 152 | device.getQueryPoolResults<uint64_t>(queryPool, 0, 1, pipelineStats, sizeof(uint64_t), vk::QueryResultFlagBits::e64); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Luc Ma <luc@sietium.com>
1 parent 98dc68c commit 190f081

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/terraintessellation/terraintessellation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ class VulkanExample : public vkx::ExampleBase {
149149
// Retrieves the results of the pipeline statistics query submitted to the command buffer
150150
void getQueryResults() {
151151
// We use vkGetQueryResults to copy the results into a host visible buffer
152-
device.getQueryPoolResults<uint64_t>(queryPool, 0, 1, pipelineStats, sizeof(uint64_t), vk::QueryResultFlagBits::e64);
152+
uint32_t count = static_cast<uint32_t>(pipelineStats.size());
153+
device.getQueryPoolResults(queryPool, 0, 1, count * sizeof(uint64_t), pipelineStats.data(), sizeof(uint64_t), vk::QueryResultFlagBits::e64);
153154
}
154155

155156
void loadAssets() override {

0 commit comments

Comments
 (0)