mesa/st: mark internal buffer map call as UNSYNCHRONIZED

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36634>
This commit is contained in:
Mike Blumenkrantz 2025-08-06 15:03:54 -04:00 committed by Marge Bot
parent 25b97a3a96
commit db07a6e850

View file

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