Mesa (staging/18.3): radv: wait on the high 32 bits of timestamp queries
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 5 14:21:33 UTC 2018
Module: Mesa
Branch: staging/18.3
Commit: d92bbe54eaf8406d2b3ceb8b6b7eba6c69681b76
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d92bbe54eaf8406d2b3ceb8b6b7eba6c69681b76
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Dec 5 11:45:19 2018 +0100
radv: wait on the high 32 bits of timestamp queries
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 at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit c7ada4901aaf192d7aacd51c3ab0ebbbb0ceeb3e)
[Emil: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Conflicts:
src/amd/vulkan/radv_query.c
---
src/amd/vulkan/radv_query.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index 8f988d9de2..cdff336f8a 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -1341,10 +1341,13 @@ 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.
+ */
radeon_emit(cs, PKT3(PKT3_WAIT_REG_MEM, 5, false));
radeon_emit(cs, WAIT_REG_MEM_NOT_EQUAL | WAIT_REG_MEM_MEM_SPACE(1));
- radeon_emit(cs, local_src_va);
- radeon_emit(cs, local_src_va >> 32);
+ radeon_emit(cs, local_src_va + 4);
+ radeon_emit(cs, (local_src_va + 4) >> 32);
radeon_emit(cs, TIMESTAMP_NOT_READY >> 32);
radeon_emit(cs, 0xffffffff);
radeon_emit(cs, 4);
More information about the mesa-commit
mailing list