zink: always use type size for query result copy stride
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 30 Aug 2021 15:08:00 +0000 (11:08 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Sep 2021 23:34:49 +0000 (23:34 +0000)
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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12933>

src/gallium/drivers/zink/zink_query.c

index 8b8d1cc..636fbc2 100644 (file)
@@ -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