Reduce code duplication now and prevent it in the following commits.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
}
}
- intel_miptree_set_depth_clear_value(brw, mt, clear_value);
+ const union isl_color_value clear_color = { .f32 = {clear_value, } };
+ intel_miptree_set_clear_color(brw, mt, clear_color);
same_clear_value = false;
}
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;
-}
-
union isl_color_value
intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
const struct intel_mipmap_tree *mt,
struct brw_bo **clear_color_bo,
uint32_t *clear_color_offset);
-bool
-intel_miptree_set_depth_clear_value(struct brw_context *brw,
- struct intel_mipmap_tree *mt,
- float clear_value);
-
#ifdef __cplusplus
}
#endif