mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nvk: Handle zero queries in CmdCopyQueryPoolResults and CmdResetQueryPool
Nothing disallow it by spec, let's avoid doing anything in that case. Signed-off-by: Mary Guillemard <mary@mary.zone> Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
This commit is contained in:
parent
c6e9dd8af6
commit
b48c6af0bf
1 changed files with 7 additions and 0 deletions
|
|
@ -322,6 +322,10 @@ nvk_CmdResetQueryPool(VkCommandBuffer commandBuffer,
|
|||
{
|
||||
VK_FROM_HANDLE(nvk_cmd_buffer, cmd, commandBuffer);
|
||||
VK_FROM_HANDLE(nvk_query_pool, pool, queryPool);
|
||||
|
||||
if (unlikely(!queryCount))
|
||||
return;
|
||||
|
||||
const struct nvk_device *dev = nvk_cmd_buffer_device(cmd);
|
||||
const struct nvk_physical_device *pdev = nvk_device_physical(dev);
|
||||
|
||||
|
|
@ -1051,6 +1055,9 @@ nvk_CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer,
|
|||
VK_FROM_HANDLE(nvk_query_pool, pool, queryPool);
|
||||
VK_FROM_HANDLE(nvk_buffer, dst_buffer, dstBuffer);
|
||||
|
||||
if (unlikely(!queryCount))
|
||||
return;
|
||||
|
||||
if (flags & VK_QUERY_RESULT_WAIT_BIT) {
|
||||
for (uint32_t i = 0; i < queryCount; i++) {
|
||||
uint64_t avail_addr = nvk_query_available_addr(pool, firstQuery + i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue