From d8fb1dc7aea35a497f5282977ff04d6c51549376 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 31 Oct 2023 14:40:04 +0100 Subject: [PATCH] gallium/util: Fix pipe_buffer_copy Some of the fields that were being left uninitialized were actually being used later. Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/auxiliary/util/u_inlines.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 6bccc629bf0..508b4434ba2 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -492,9 +492,7 @@ pipe_buffer_copy(struct pipe_context *pipe, unsigned size) { struct pipe_box box; - /* only these fields are used */ - box.x = (int)src_offset; - box.width = (int)size; + u_box_1d(src_offset, size, &box); pipe->resource_copy_region(pipe, dst, 0, dst_offset, 0, 0, src, 0, &box); }