Merge pull request #151 from pbantolas/fix-occlusionquery-copy
Adjust occlusionquery according to Vulkan spec.
This commit is contained in:
commit
2906df5308
1 changed files with 12 additions and 12 deletions
|
|
@ -261,17 +261,6 @@ public:
|
||||||
|
|
||||||
vkCmdEndQuery(drawCmdBuffers[i], queryPool, 1);
|
vkCmdEndQuery(drawCmdBuffers[i], queryPool, 1);
|
||||||
|
|
||||||
// Query results
|
|
||||||
vkCmdCopyQueryPoolResults(
|
|
||||||
drawCmdBuffers[i],
|
|
||||||
queryPool,
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
queryResult.buffer,
|
|
||||||
0,
|
|
||||||
sizeof(uint64_t),
|
|
||||||
VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT);
|
|
||||||
|
|
||||||
// Visible pass
|
// Visible pass
|
||||||
// Clear color and depth attachments
|
// Clear color and depth attachments
|
||||||
VkClearAttachment clearAttachments[2] = {};
|
VkClearAttachment clearAttachments[2] = {};
|
||||||
|
|
@ -318,6 +307,17 @@ public:
|
||||||
|
|
||||||
vkCmdEndRenderPass(drawCmdBuffers[i]);
|
vkCmdEndRenderPass(drawCmdBuffers[i]);
|
||||||
|
|
||||||
|
// Query results
|
||||||
|
vkCmdCopyQueryPoolResults(
|
||||||
|
drawCmdBuffers[i],
|
||||||
|
queryPool,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
queryResult.buffer,
|
||||||
|
0,
|
||||||
|
sizeof(uint64_t),
|
||||||
|
VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT);
|
||||||
|
|
||||||
err = vkEndCommandBuffer(drawCmdBuffers[i]);
|
err = vkEndCommandBuffer(drawCmdBuffers[i]);
|
||||||
assert(!err);
|
assert(!err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue