[Mesa-dev] [PATCH 6/8] i965: Drop separate stencil assertions in update_draw_buffer().

Eric Anholt eric at anholt.net
Thu Dec 8 13:40:01 PST 2011


The comment said they deserved to be in emit_depthbuffer, and at this
point they were all there already.
---
 src/mesa/drivers/dri/i965/brw_vtbl.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index c0a0b52..db0fe7e 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -95,7 +95,6 @@ brw_update_draw_buffer(struct intel_context *intel)
 {
    struct gl_context *ctx = &intel->ctx;
    struct gl_framebuffer *fb = ctx->DrawBuffer;
-   struct intel_renderbuffer *irbStencil = NULL;
    bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
 
    if (!fb) {
@@ -103,8 +102,6 @@ brw_update_draw_buffer(struct intel_context *intel)
       return;
    }
 
-   irbStencil = intel_get_renderbuffer(fb, BUFFER_STENCIL);
-
    /* Do this here, not core Mesa, since this function is called from
     * many places within the driver.
     */
@@ -123,18 +120,6 @@ brw_update_draw_buffer(struct intel_context *intel)
       return;
    }
 
-   /* Check some stencil invariants.  These should probably be in
-    * emit_depthbuffer().
-    */
-   if (irbStencil && irbStencil->mt) {
-      if (!intel->has_separate_stencil)
-	 assert(irbStencil->Base.Format == MESA_FORMAT_S8_Z24);
-      if (fb_has_hiz || intel->must_use_separate_stencil)
-	 assert(irbStencil->Base.Format == MESA_FORMAT_S8);
-      if (irbStencil->Base.Format == MESA_FORMAT_S8)
-	 assert(intel->has_separate_stencil);
-   }
-
    /* Mesa's Stencil._Enabled field is updated when
     * _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value
     * only changes with _NEW_STENCIL (which seems sensible).  So flag it
-- 
1.7.7.3



More information about the mesa-dev mailing list