[Mesa-dev] [PATCH 03/22] i965/gen8: Take into account stencil meta blit layer override

Topi Pohjolainen topi.pohjolainen at intel.com
Mon Jun 9 00:45:37 PDT 2014


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/gen8_surface_state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index cd2fb40..f5c75fe 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -135,6 +135,8 @@ gen8_update_texture_surface(struct gl_context *ctx,
    struct gl_texture_image *firstImage = tObj->Image[0][tObj->BaseLevel];
    struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, unit);
    mesa_format format = intelObj->_Format;
+   const unsigned min_layer =
+      brw->meta_blit.is_active ? brw->meta_blit.src_layer : tObj->MinLayer;
 
    if (tObj->Target == GL_TEXTURE_BUFFER) {
       brw_update_buffer_texture_surface(ctx, unit, surf_offset);
@@ -189,7 +191,7 @@ gen8_update_texture_surface(struct gl_context *ctx,
    surf[3] = SET_FIELD(effective_depth - 1, BRW_SURFACE_DEPTH) | (pitch - 1);
 
    surf[4] = gen7_surface_msaa_bits(mt->num_samples, mt->msaa_layout) |
-             SET_FIELD(tObj->MinLayer, GEN7_SURFACE_MIN_ARRAY_ELEMENT) |
+             SET_FIELD(min_layer, GEN7_SURFACE_MIN_ARRAY_ELEMENT) |
              SET_FIELD(effective_depth - 1,
                        GEN7_SURFACE_RENDER_TARGET_VIEW_EXTENT);
 
-- 
1.8.3.1



More information about the mesa-dev mailing list