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: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26603>
(cherry picked from commit 4f2b4b81d1)
This commit is contained in:
Juston Li
2023-12-08 13:51:12 -08:00
committed by Eric Engestrom
parent 4a60946225
commit 836ef56c51
2 changed files with 2 additions and 2 deletions

View File

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

View File

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