radv: wait on the high 32 bits of timestamp queries
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Dec 2018 10:45:19 +0000 (11:45 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Dec 2018 12:05:58 +0000 (13:05 +0100)
In case we are unlucky if the low part is 0xffffffff.

Fixes: 5d6a560a29 ("radv: do not use the availability bit for timestamp queries")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_query.c

index 276cc1c42d7907ac9721ddf796879506c282e73d..3c62b71dd6d28a4b139fac5ff72aae7e57ec879e 100644 (file)
@@ -1336,8 +1336,11 @@ void radv_CmdCopyQueryPoolResults(
 
 
                        if (flags & VK_QUERY_RESULT_WAIT_BIT) {
+                               /* Wait on the high 32 bits of the timestamp in
+                                * case the low part is 0xffffffff.
+                                */
                                radv_cp_wait_mem(cs, WAIT_REG_MEM_NOT_EQUAL,
-                                                local_src_va,
+                                                local_src_va + 4,
                                                 TIMESTAMP_NOT_READY >> 32,
                                                 0xffffffff);
                        }