i965: Track that the stencil data was updated when clearing
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 11 Jun 2016 23:27:48 +0000 (16:27 -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>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_clear.c

index 1dfff090c08585e1a0298bbccbd7add38c4ea2e3..18b8fcbe200c7ce17f245c8fbfa297d9cf69926c 100644 (file)
@@ -239,6 +239,14 @@ brw_clear(struct gl_context *ctx, GLbitfield mask)
       }
    }
 
+   if (mask & BUFFER_BIT_STENCIL) {
+      struct intel_renderbuffer *stencil_irb =
+         intel_get_renderbuffer(fb, BUFFER_STENCIL);
+      struct intel_mipmap_tree *mt = stencil_irb->mt;
+      if (mt && mt->stencil_mt)
+         mt->stencil_mt->r8stencil_needs_update = true;
+   }
+
    /* BLORP is currently only supported on Gen6+. */
    if (brw->gen >= 6 && (mask & BUFFER_BITS_COLOR)) {
       const bool encode_srgb = ctx->Color.sRGBEnabled;