From fc7badeac09f88ba4fe204cba79cde5bee64c986 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 12 Apr 2025 13:02:30 +0200 Subject: [PATCH] zink: don't apply the map_offset when mapping a staging resource in zink_buffer_map Fixes regressions in the OpenCL CTS allocation tests. Fixes: 5d46e2bf3c3 ("zink: implement unsynchronized staging uploads for buffers") Part-of: --- src/gallium/drivers/zink/zink_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 80a8dd7b898..e9f926d11ce 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -2376,6 +2376,7 @@ zink_buffer_map(struct pipe_context *pctx, } res = zink_resource(trans->staging_res); usage |= PIPE_MAP_UNSYNCHRONIZED; + map_offset = trans->offset; ptr = ((uint8_t *)ptr); } else { /* At this point, the buffer is always idle (we checked it above). */