Module: Mesa Branch: staging/23.3 Commit: 836ef56c51c9f904417f165815e8a3b197bd9d00 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=836ef56c51c9f904417f165815e8a3b197bd9d00
Author: Juston Li <[email protected]> Date: Fri Dec 8 13:51:12 2023 -0800 venus: fix query feedback copy sanitize off by 1 Copy sanitization incorrectly included +1 range of the reset. Eg Reset Query=0 QueryCount=5 is [0,5) exclusive, not [0,5] inclusive. Fixes: 5b24ab91e43 ("venus: switch to unconditionally deferred query feedback") Signed-off-by: Juston Li <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26603> (cherry picked from commit 4f2b4b81d16edec691940f84e9b2b8e2cdb3dfd4) --- .pick_status.json | 2 +- src/virtio/vulkan/vn_queue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index ba109267fb9..045101c22ca 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1364,7 +1364,7 @@ "description": "venus: fix query feedback copy sanitize off by 1", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "5b24ab91e43a54b4f4081db52ebf6653b97e72bb", "notes": null diff --git a/src/virtio/vulkan/vn_queue.c b/src/virtio/vulkan/vn_queue.c index 31e2d2d408d..9d8f6ad4edf 100644 --- a/src/virtio/vulkan/vn_queue.c +++ b/src/virtio/vulkan/vn_queue.c @@ -547,7 +547,7 @@ vn_combine_query_feedback_batches_and_record( (vn_query_pool_to_handle(batch_clone->query_pool) == vn_query_pool_to_handle(batch->query_pool)) && batch_clone->query >= batch->query && - batch_clone->query <= batch->query + batch->query_count) { + batch_clone->query < batch->query + batch->query_count) { simple_mtx_lock(&feedback_cmd_pool->mutex); list_move_to(&batch_clone->head, &cmd_pool->free_query_batches);
