mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 15:20:26 +01:00
i965/blorp: Take an explicit fast clear op in resolve_color
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
This commit is contained in:
parent
4afe282a35
commit
7a9c37eb7b
3 changed files with 18 additions and 15 deletions
|
|
@ -924,7 +924,8 @@ brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
|
|||
|
||||
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);
|
||||
|
||||
|
|
@ -938,18 +939,6 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
|||
&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
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -2174,6 +2174,19 @@ intel_miptree_resolve_color(struct brw_context *brw,
|
|||
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) {
|
||||
|
|
@ -2190,7 +2203,7 @@ intel_miptree_resolve_color(struct brw_context *brw,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue