diff options
author | Jason Ekstrand <[email protected]> | 2017-08-17 15:27:25 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-08-18 17:31:02 -0700 |
commit | 61d2f3f1c24323a1c067595ec78dfbfefdc72b41 (patch) | |
tree | 064119de711f02f4e2c77c7d0d1f7693c4f6aa22 /src/mesa | |
parent | d5e217dbfda2a87e149bdc8586c25143fc0ac183 (diff) |
i965/miptree: Return NONE from texture_aux_usage when fully resolved
This little optimization improves the performance of SynMark v7
TexFilterTri by almost 10% on Sky Lake GT4 among other improvements.
We've been doing it for some time but somehow it got dropped during
the miptree refactoring.
Reviewed-by: Kenneth Graunke <[email protected]>
Bugzilla: https://bugs.freedesktop.org/102258
Cc: "17.2" <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index dab60c4b045..2d6a0a3ab7c 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -2571,7 +2571,20 @@ intel_miptree_texture_aux_usage(struct brw_context *brw, case ISL_AUX_USAGE_CCS_D: case ISL_AUX_USAGE_CCS_E: - if (mt->mcs_buf && can_texture_with_ccs(brw, mt, view_format)) + if (!mt->mcs_buf) { + assert(mt->aux_usage == ISL_AUX_USAGE_CCS_D); + return ISL_AUX_USAGE_NONE; + } + + /* If we don't have any unresolved color, report an aux usage of + * ISL_AUX_USAGE_NONE. This way, texturing won't even look at the + * aux surface and we can save some bandwidth. + */ + if (!intel_miptree_has_color_unresolved(mt, 0, INTEL_REMAINING_LEVELS, + 0, INTEL_REMAINING_LAYERS)) + return ISL_AUX_USAGE_NONE; + + if (can_texture_with_ccs(brw, mt, view_format)) return ISL_AUX_USAGE_CCS_E; break; |