Module: Mesa
Branch: main
Commit: 039ed2de94d027cce6f7ac6e6af8090937eeb929
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=039ed2de94d027cce6f7ac6e6af8090937eeb929

Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Aug 30 11:08:00 2021 -0400

zink: always use type size for query result copy stride

0 should be legal here since this is only copying 1 result at a time,
but some drivers can't withstand the awesome power of zero strides, so
just be safe and pass the type size

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12933>

---

 src/gallium/drivers/zink/zink_query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_query.c 
b/src/gallium/drivers/zink/zink_query.c
index 8b8d1cc44c3..636fbc2689d 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -563,7 +563,7 @@ copy_pool_results_to_buffer(struct zink_context *ctx, 
struct zink_query *query,
    util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + 
result_size);
    assert(query_id < NUM_QUERIES);
    VKCTX(CmdCopyQueryPoolResults)(batch->state->cmdbuf, pool, query_id, 
num_results, res->obj->buffer,
-                             offset, 0, flags);
+                             offset, type_size, flags);
 }
 
 static void

Reply via email to