[Mesa-dev] [PATCH 1/6] r600g: fix clear_buffer fallback with offset != 0

Marek Olšák maraeo at gmail.com
Sun Nov 8 13:44:24 PST 2015


From: Marek Olšák <marek.olsak at amd.com>

Discovered by luck. This code path hasn't been exercised since transform
feedback was implemented.
---
 src/gallium/drivers/r600/r600_blit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index aede840..90a1453 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;
-- 
2.1.4



More information about the mesa-dev mailing list