i965: Use the brw_context for the clear color and value setters
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 29 Mar 2018 00:53:13 +0000 (17:53 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 9 Apr 2018 17:56:48 +0000 (10:56 -0700)
Do what all the other functions in the miptree API do.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_blorp.c
src/mesa/drivers/dri/i965/brw_clear.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index d91d03609a23dc97494169c29774db242fb2952b..0ccfa2125472f0467aa8b7c2fa0d594e5318b741 100644 (file)
@@ -1240,7 +1240,7 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
                                            &ctx->Color.ClearColor);
 
       bool same_clear_color =
-         !intel_miptree_set_clear_color(ctx, irb->mt, clear_color);
+         !intel_miptree_set_clear_color(brw, irb->mt, clear_color);
 
       /* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the clear
        * is redundant and can be skipped.
index 63c0b24189871c0c39362417d35e2ced4234a7c6..487de9b89979d51a49b1de7129919100e10e8db5 100644 (file)
@@ -213,7 +213,7 @@ brw_fast_clear_depth(struct gl_context *ctx)
          }
       }
 
-      intel_miptree_set_depth_clear_value(ctx, mt, clear_value);
+      intel_miptree_set_depth_clear_value(brw, mt, clear_value);
       same_clear_value = false;
    }
 
index 54d36400757be21ffc857c0b46b42cf59ddc63d7..df9b76892ac566d8d24725098fca84f4c5ac40e2 100644 (file)
@@ -733,26 +733,26 @@ intel_miptree_sample_with_hiz(struct brw_context *brw,
 
 
 static inline bool
-intel_miptree_set_clear_color(struct gl_context *ctx,
+intel_miptree_set_clear_color(struct brw_context *brw,
                               struct intel_mipmap_tree *mt,
                               union isl_color_value clear_color)
 {
    if (memcmp(&mt->fast_clear_color, &clear_color, sizeof(clear_color)) != 0) {
       mt->fast_clear_color = clear_color;
-      ctx->NewDriverState |= BRW_NEW_AUX_STATE;
+      brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
       return true;
    }
    return false;
 }
 
 static inline bool
-intel_miptree_set_depth_clear_value(struct gl_context *ctx,
+intel_miptree_set_depth_clear_value(struct brw_context *brw,
                                     struct intel_mipmap_tree *mt,
                                     float clear_value)
 {
    if (mt->fast_clear_color.f32[0] != clear_value) {
       mt->fast_clear_color.f32[0] = clear_value;
-      ctx->NewDriverState |= BRW_NEW_AUX_STATE;
+      brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
       return true;
    }
    return false;