radv: do not add the query pool BO to the list in vkCmdEndQuery()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 15 Nov 2017 09:55:05 +0000 (10:55 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 20 Nov 2017 10:18:20 +0000 (11:18 +0100)
As per the spec, the query identified by queryPool and query
must currently be active. Applications have to call vkCmdBeginQuery()
before, and thus the query pool BO will already be in the list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_query.c

index 6a80740ce0289f7dedcaa69712fe23ac184bdc55..5dc88af8f84ac6393dc41d88b80dcc2bed658730 100644 (file)
@@ -1125,7 +1125,9 @@ void radv_CmdEndQuery(
        uint64_t avail_va = va + pool->availability_offset + 4 * query;
        va += pool->stride * query;
 
-       radv_cs_add_buffer(cmd_buffer->device->ws, cs, pool->bo, 8);
+       /* Do not need to add the pool BO to the list because the query must
+        * currently be active, which means the BO is already in the list.
+        */
 
        switch (pool->type) {
        case VK_QUERY_TYPE_OCCLUSION: