v2: Add support for blorp and removed the support for meta
v3 (Ben): Add assertion on compressed non-fast clear - must
be partial clear.
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
brw_blorp_exec(brw, ¶ms);
intel_miptree_slice_set_needs_hiz_resolve(dst_mt, dst_level, dst_layer);
+
+ if (intel_miptree_is_lossless_compressed(brw, dst_mt))
+ dst_mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
}
* redundant clears.
*/
irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;
+ } else if (intel_miptree_is_lossless_compressed(brw, irb->mt)) {
+ /* Compressed buffers can be cleared also using normal rep-clear. In
+ * such case they bahave such as if they were drawn using normal 3D
+ * render pipeline, and we simply mark the mcs as dirty.
+ */
+ assert(partial_clear);
+ irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
}
return true;
struct intel_renderbuffer *irb =
intel_renderbuffer(fb->_ColorDrawBuffers[i]);
- if (irb)
+ 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;
+ }
+ }
}
}