Mesa (staging/21.1): anv: fix availability for copying timestamp query results

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 5 16:30:18 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: ff4455af781ef4ad5fc86343b05d8e51128a2bfa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff4455af781ef4ad5fc86343b05d8e51128a2bfa

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jun  1 12:26:27 2021 -0400

anv: fix availability for copying timestamp query results

idx here is the index of the value being written, so if it isn't used/incremented
when the query result is written, the availability result will clobber it and
be written to the same buffer offset

Cc: mesa-stable at lists.freedesktop.org

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11116>
(cherry picked from commit 5515d3aec5ebe4e7dd7428aefdc2c1933414cd92)

---

 .pick_status.json             | 2 +-
 src/intel/vulkan/genX_query.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f6b7454fa25..97053fba6a1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1831,7 +1831,7 @@
         "description": "anv: fix availability for copying timestamp query results",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c
index 23e3d1a9f60..dbb074c4170 100644
--- a/src/intel/vulkan/genX_query.c
+++ b/src/intel/vulkan/genX_query.c
@@ -1448,7 +1448,7 @@ void genX(CmdCopyQueryPoolResults)(
 
       case VK_QUERY_TYPE_TIMESTAMP:
          result = mi_mem64(anv_address_add(query_addr, 8));
-         gpu_write_query_result(&b, dest_addr, flags, 0, result);
+         gpu_write_query_result(&b, dest_addr, flags, idx++, result);
          break;
 
 #if GFX_VER >= 8



More information about the mesa-commit mailing list