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@lists.freedesktop.org

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11116>
(cherry picked from commit 5515d3aec5)
This commit is contained in:
Mike Blumenkrantz 2021-06-01 12:26:27 -04:00 committed by Eric Engestrom
parent b6c9c31a89
commit ff4455af78
2 changed files with 2 additions and 2 deletions

View file

@ -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
},

View file

@ -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