}
}
- if (is_render_target) {
- intel_miptree_used_for_rendering(mt);
-
- if (surf->aux_usage == ISL_AUX_USAGE_CCS_E)
- mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
- }
+ if (is_render_target)
+ intel_miptree_used_for_rendering(brw, mt);
if (surf->aux_usage != ISL_AUX_USAGE_NONE) {
/* We only really need a clear color if we also have an auxiliary
if (irb) {
brw_render_cache_set_add_bo(brw, irb->mt->bo);
-
- if (intel_miptree_is_lossless_compressed(brw, irb->mt)) {
- irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
- }
+ intel_miptree_used_for_rendering(brw, irb->mt);
}
}
}
}
assert(brw_render_target_supported(brw, rb));
- intel_miptree_used_for_rendering(mt);
mesa_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
if (unlikely(!brw->format_supported_as_render_target[rb_format])) {
}
}
- intel_miptree_used_for_rendering(irb->mt);
-
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE, 6 * 4, 32, &offset);
format = brw->render_target_format[rb_format];
* for rendering.
*/
static inline void
-intel_miptree_used_for_rendering(struct intel_mipmap_tree *mt)
+intel_miptree_used_for_rendering(const struct brw_context *brw,
+ struct intel_mipmap_tree *mt)
{
/* If the buffer was previously in fast clear state, change it to
* unresolved state, since it won't be guaranteed to be clear after
* rendering occurs.
*/
- if (mt->fast_clear_state == INTEL_FAST_CLEAR_STATE_CLEAR)
+ if (mt->fast_clear_state == INTEL_FAST_CLEAR_STATE_CLEAR ||
+ intel_miptree_is_lossless_compressed(brw, mt))
mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
}