[Mesa-dev] [PATCH v2 01/11] i965: Use the brw_context for the clear color and value setters
Nanley Chery
nanleychery at gmail.com
Wed Apr 4 20:58:08 UTC 2018
Do what all the other functions in the miptree API do.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 2 +-
src/mesa/drivers/dri/i965/brw_clear.c | 2 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 44064fc0cf3..f5a653fff97 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1241,7 +1241,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.
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 8aa83722ee9..8f7594baf59 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -212,7 +212,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);
}
bool need_clear = false;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 07c85807e80..0c24b93e3da 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -717,26 +717,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;
--
2.16.2
More information about the mesa-dev
mailing list