From db07a6e8500e8e5bbdc3e87b24ffeea247e8b9ba Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 6 Aug 2025 15:03:54 -0400 Subject: [PATCH] mesa/st: mark internal buffer map call as UNSYNCHRONIZED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit these are new buffers with empty contents which are immediately unmapped after a memcpy, so there's no reason to force the driver (or tc) to sync Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/bufferobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 6b598a5b48b..08017988de6 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -360,7 +360,9 @@ bufferobj_data(struct gl_context *ctx, obj->buffer = screen->resource_create(screen, &buffer); if (obj->buffer && data) - pipe_buffer_write(pipe, obj->buffer, 0, size, data); + pipe->buffer_subdata(pipe, obj->buffer, + PIPE_MAP_WRITE | PIPE_MAP_DISCARD_WHOLE_RESOURCE | PIPE_MAP_UNSYNCHRONIZED, + 0, size, data); } if (!obj->buffer) {