<div dir="ltr">Yeah, brw is always better for i965 functions.<br><div><br>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 30, 2018 at 11:12 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do what all the other functions in the miptree API do.<br>
---<br>
 src/mesa/drivers/dri/i965/brw_<wbr>blorp.c         | 2 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>clear.c         | 2 +-<br>
 src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h | 8 ++++----<br>
 3 files changed, 6 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
index 44064fc0cf3..f5a653fff97 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
@@ -1241,7 +1241,7 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,<br>
                                            &ctx->Color.ClearColor);<br>
<br>
       bool same_clear_color =<br>
-         !intel_miptree_set_clear_<wbr>color(ctx, irb->mt, clear_color);<br>
+         !intel_miptree_set_clear_<wbr>color(brw, irb->mt, clear_color);<br>
<br>
       /* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the clear<br>
        * is redundant and can be skipped.<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_clear.c b/src/mesa/drivers/dri/i965/<wbr>brw_clear.c<br>
index 8aa83722ee9..8f7594baf59 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_clear.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_clear.c<br>
@@ -212,7 +212,7 @@ brw_fast_clear_depth(struct gl_context *ctx)<br>
          }<br>
       }<br>
<br>
-      intel_miptree_set_depth_clear_<wbr>value(ctx, mt, clear_value);<br>
+      intel_miptree_set_depth_clear_<wbr>value(brw, mt, clear_value);<br>
    }<br>
<br>
    bool need_clear = false;<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
index 07c85807e80..0c24b93e3da 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
@@ -717,26 +717,26 @@ intel_miptree_sample_with_hiz(<wbr>struct brw_context *brw,<br>
<br>
<br>
 static inline bool<br>
-intel_miptree_set_clear_<wbr>color(struct gl_context *ctx,<br>
+intel_miptree_set_clear_<wbr>color(struct brw_context *brw,<br>
                               struct intel_mipmap_tree *mt,<br>
                               union isl_color_value clear_color)<br>
 {<br>
    if (memcmp(&mt->fast_clear_color, &clear_color, sizeof(clear_color)) != 0) {<br>
       mt->fast_clear_color = clear_color;<br>
-      ctx->NewDriverState |= BRW_NEW_AUX_STATE;<br>
+      brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;<br>
       return true;<br>
    }<br>
    return false;<br>
 }<br>
<br>
 static inline bool<br>
-intel_miptree_set_depth_<wbr>clear_value(struct gl_context *ctx,<br>
+intel_miptree_set_depth_<wbr>clear_value(struct brw_context *brw,<br>
                                     struct intel_mipmap_tree *mt,<br>
                                     float clear_value)<br>
 {<br>
    if (mt->fast_clear_color.f32[0] != clear_value) {<br>
       mt->fast_clear_color.f32[0] = clear_value;<br>
-      ctx->NewDriverState |= BRW_NEW_AUX_STATE;<br>
+      brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;<br>
       return true;<br>
    }<br>
    return false;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.16.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>