summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2021-01-05 15:53:29 +0100
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2021-01-13 12:24:32 +0100
commitfcd5925612e8efd15072b160743560a9a5ad4f86 (patch)
tree13667b0612ec86b38dd7972c74a341b6db1c579e /src
parent697c93abc1c41af8ec379f5334c44005cb344152 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_meta_fast_clear.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index 05be3da005b..8e5b1f89bfa 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -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);