void
brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt,
- unsigned level, unsigned layer)
+ unsigned level, unsigned layer,
+ enum blorp_fast_clear_op resolve_op)
{
DBG("%s to mt %p level %u layer %u\n", __FUNCTION__, mt, level, layer);
&level, layer, 1 /* num_layers */,
isl_tmp);
- enum blorp_fast_clear_op resolve_op;
- if (brw->gen >= 9) {
- if (surf.aux_usage == ISL_AUX_USAGE_CCS_E)
- resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
- else
- resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL;
- } else {
- assert(surf.aux_usage == ISL_AUX_USAGE_CCS_D);
- /* Broadwell and earlier do not have a partial resolve */
- resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
- }
-
/* Ivybrigde PRM Vol 2, Part 1, "11.7 MCS Buffer for Render Target(s)":
*
* "Any transition from any value in {Clear, Render, Resolve} to a
void
brw_blorp_resolve_color(struct brw_context *brw,
struct intel_mipmap_tree *mt,
- unsigned level, unsigned layer);
+ unsigned level, unsigned layer,
+ enum blorp_fast_clear_op resolve_op);
void
intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
if (!intel_miptree_needs_color_resolve(brw, mt, flags))
return false;
+ enum blorp_fast_clear_op resolve_op;
+ if (brw->gen >= 9) {
+ if (intel_miptree_is_lossless_compressed(brw, mt)) {
+ resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
+ } else {
+ resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL;
+ }
+ } else {
+ /* Broadwell and earlier do not have a partial resolve */
+ assert(!intel_miptree_is_lossless_compressed(brw, mt));
+ resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
+ }
+
bool resolved = false;
foreach_list_typed_safe(struct intel_resolve_map, map, link,
&mt->color_resolve_map) {
assert(map->fast_clear_state != INTEL_FAST_CLEAR_STATE_RESOLVED);
- brw_blorp_resolve_color(brw, mt, map->level, map->layer);
+ brw_blorp_resolve_color(brw, mt, map->level, map->layer, resolve_op);
intel_resolve_map_remove(map);
resolved = true;
}