From: Marek Olšák Date: Thu, 5 Nov 2015 11:24:20 +0000 (+0100) Subject: r600g: fix clear_buffer fallback with offset != 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f1e34e6c80b4cc59822eaf0c1731cab46befa46;p=mesa.git r600g: fix clear_buffer fallback with offset != 0 Discovered by luck. This code path hasn't been exercised since transform feedback was implemented. Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index aede8408446..90a1453ef69 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -604,6 +604,7 @@ static void r600_clear_buffer(struct pipe_context *ctx, struct pipe_resource *ds } else { uint32_t *map = r600_buffer_map_sync_with_rings(&rctx->b, r600_resource(dst), PIPE_TRANSFER_WRITE); + map += offset / 4; size /= 4; for (unsigned i = 0; i < size; i++) *map++ = value;