diff options
author | Rob Clark <[email protected]> | 2014-12-07 12:10:38 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-12-09 18:03:40 -0500 |
commit | 3dbcd25022d0bd62484ac4a9498e4a1bbb5af0b0 (patch) | |
tree | 3ada4bc22b2e5d3b5dd3b8b9e1e9bb3048dbe89a /src/gallium/drivers/freedreno/a4xx | |
parent | 6a5ba23fa6156abb7d643080e2a2b477aa1ed559 (diff) |
freedreno/a4xx: fix rendering to layer != 0
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_gmem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c index 8ad00393005..3c900522443 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c @@ -126,12 +126,15 @@ emit_gmem2mem_surf(struct fd_context *ctx, struct fd_ringbuffer *ring = ctx->ring; struct fd_resource *rsc = fd_resource(psurf->texture); struct fd_resource_slice *slice = &rsc->slices[psurf->u.tex.level]; + uint32_t layer_offset = slice->size0 * psurf->u.tex.first_layer; + + debug_assert(psurf->u.tex.first_layer == psurf->u.tex.last_layer); OUT_PKT0(ring, REG_A4XX_RB_COPY_CONTROL, 4); OUT_RING(ring, A4XX_RB_COPY_CONTROL_MSAA_RESOLVE(MSAA_ONE) | A4XX_RB_COPY_CONTROL_MODE(RB_COPY_RESOLVE) | A4XX_RB_COPY_CONTROL_GMEM_BASE(base)); - OUT_RELOCW(ring, rsc->bo, slice->offset, 0, 0); /* RB_COPY_DEST_BASE */ + OUT_RELOCW(ring, rsc->bo, slice->offset + layer_offset, 0, 0); /* RB_COPY_DEST_BASE */ OUT_RING(ring, A4XX_RB_COPY_DEST_PITCH_PITCH(slice->pitch * rsc->cpp)); OUT_RING(ring, A4XX_RB_COPY_DEST_INFO_TILE(TILE4_LINEAR) | A4XX_RB_COPY_DEST_INFO_FORMAT(fd4_pipe2color(psurf->format)) | |