summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-11-05 12:24:20 +0100
committerMarek Olšák <[email protected]>2015-11-13 19:54:40 +0100
commit7f1e34e6c80b4cc59822eaf0c1731cab46befa46 (patch)
tree1af091c99aa7ce35e6ccd8c0ea1413af873ce304 /src/gallium
parent01526136badbc611b7dafa5a99934e7e8cf527e8 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c1
1 files changed, 1 insertions, 0 deletions
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;