[Mesa-dev] [PATCH 05/15] i965: Adjust surface_state emission to account for MinLayer/MinLevel
Chris Forbes
chrisf at ijw.co.nz
Tue Jan 21 02:34:21 PST 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index bda09a0..430bc36 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -322,11 +322,13 @@ gen7_update_texture_surface(struct gl_context *ctx,
surf[3] = SET_FIELD(mt->logical_depth0 - 1, BRW_SURFACE_DEPTH) |
((intelObj->mt->region->pitch) - 1);
- surf[4] = gen7_surface_msaa_bits(mt->num_samples, mt->msaa_layout);
+ surf[4] = gen7_surface_msaa_bits(mt->num_samples, mt->msaa_layout) |
+ SET_FIELD(tObj->MinLayer, GEN7_SURFACE_MIN_ARRAY_ELEMENT);
+
+ surf[4] |= (mt->logical_depth0 - 1) << 7;
surf[5] = (SET_FIELD(GEN7_MOCS_L3, GEN7_SURFACE_MOCS) |
- SET_FIELD(tObj->BaseLevel - mt->first_level,
- GEN7_SURFACE_MIN_LOD) |
+ SET_FIELD(tObj->MinLevel + tObj->BaseLevel - mt->first_level, GEN7_SURFACE_MIN_LOD) |
/* mip count */
(intelObj->_MaxLevel - tObj->BaseLevel));
--
1.8.5.3
More information about the mesa-dev
mailing list