i965/gen7: Copy stencil when sampling the stencil texture
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 11 Jun 2016 23:46:13 +0000 (16:46 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Fri, 26 Aug 2016 17:09:22 +0000 (10:09 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_context.c

index 58cd03d..888097d 100644 (file)
@@ -235,6 +235,11 @@ intel_update_state(struct gl_context * ctx, GLuint new_state)
                            0 : INTEL_MIPTREE_IGNORE_CCS_E;
       intel_miptree_resolve_color(brw, tex_obj->mt, flags);
       brw_render_cache_set_check_flush(brw, tex_obj->mt->bo);
+
+      if (tex_obj->base.StencilSampling ||
+          tex_obj->mt->format == MESA_FORMAT_S_UINT8) {
+         intel_update_r8stencil(brw, tex_obj->mt);
+      }
    }
 
    /* Resolve color for each active shader image. */