radv: skip fast-clear eliminate for CMASK based on a predicate

If we have CMASK, we can also skip FCE like we do for DCC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8332>
This commit is contained in:
Samuel Pitoiset 2021-01-05 15:53:29 +01:00
parent 697c93abc1
commit fcd5925612
1 changed files with 3 additions and 1 deletions

View File

@ -792,12 +792,14 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
}
}
if (radv_dcc_enabled(image, subresourceRange->baseMipLevel)) {
if (image->fce_pred_offset != 0) {
/* Clear the image's fast-clear eliminate predicate because
* FMASK and DCC also imply a fast-clear eliminate.
*/
radv_update_fce_metadata(cmd_buffer, image, subresourceRange, false);
}
if (radv_dcc_enabled(image, subresourceRange->baseMipLevel)) {
/* Mark the image as being decompressed. */
if (decompress_dcc)
radv_update_dcc_metadata(cmd_buffer, image, subresourceRange, false);