summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/r600_texture.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/r600_texture.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/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeonsi/r600_texture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c
index 64d4b0e64a8..3a62898cac2 100644
--- a/src/gallium/drivers/radeonsi/r600_texture.c
+++ b/src/gallium/drivers/radeonsi/r600_texture.c
@@ -157,7 +157,8 @@ static int r600_init_surface(struct r600_screen *rscreen,
surface->flags |= RADEON_SURF_ZBUFFER;
if (is_stencil) {
- surface->flags |= RADEON_SURF_SBUFFER;
+ surface->flags |= RADEON_SURF_SBUFFER |
+ RADEON_SURF_HAS_SBUFFER_MIPTREE;
}
}
return 0;
@@ -183,7 +184,8 @@ static int r600_setup_surface(struct pipe_screen *screen,
rtex->surface.level[0].pitch_bytes = pitch_in_bytes_override;
rtex->surface.level[0].slice_size = pitch_in_bytes_override * rtex->surface.level[0].nblk_y;
if (rtex->surface.flags & RADEON_SURF_SBUFFER) {
- rtex->surface.stencil_offset = rtex->surface.level[0].slice_size;
+ rtex->surface.stencil_offset =
+ rtex->surface.stencil_level[0].offset = rtex->surface.level[0].slice_size;
}
}
return 0;