aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 89074a64930..32be4b033eb 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3804,3 +3804,29 @@ intel_miptree_get_aux_isl_usage(const struct brw_context *brw,
return mt->aux_usage;
}
+
+bool
+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;
+ brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
+ return true;
+ }
+ return false;
+}
+
+bool
+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;
+ brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
+ return true;
+ }
+ return false;
+}