summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-11-20 12:48:30 +0100
committerMichel Dänzer <[email protected]>2012-11-28 13:35:17 +0100
commitfa83d52961efeb97c4b5d613e51411a784e68478 (patch)
tree7e3b2975fe6d73595944cce9a2e22c13e65951e5 /src/gallium/drivers/radeonsi/si_state.c
parent39b56afaa238f3f5aadf562a6fb9786cad1105b8 (diff)
radeonsi: Use explicit stencil mipmap level offsets.
Extracted from r600g commit 428e37c2da420f7dc14a2ea265f2387270f9bee1. Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 09948618b93..95ea8606053 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1694,12 +1694,9 @@ static void si_db(struct r600_context *rctx, struct si_pm4_state *pm4,
R600_ERR("Invalid DB format: %d, disabling DB.\n", rtex->real_format);
}
- z_offs = r600_resource_va(rctx->context.screen, surf->base.texture);
+ s_offs = z_offs = r600_resource_va(rctx->context.screen, surf->base.texture);
z_offs += rtex->surface.level[level].offset;
-
- s_offs = r600_resource_va(rctx->context.screen, surf->base.texture);
- s_offs += rtex->surface.stencil_offset;
- z_offs += rtex->surface.level[level].offset / 4;
+ s_offs += rtex->surface.stencil_level[level].offset;
z_offs >>= 8;
s_offs >>= 8;