radv: only use predication if the FCE value is allocated

The FCE predicate value is only allocated if DCC is enabled.
We only want to use predication for DCC decompressions and for FCE
but not having FMASK doesn't mean the predicate is allocated.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4075
Fixes: 6e7008e94b ("radv: do not predicate FMASK decompression when DCC+MSAA is used")
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/8441>
This commit is contained in:
Samuel Pitoiset 2021-01-12 14:16:16 +01:00 committed by Marge Bot
parent 5331b1d945
commit 735b808639

View file

@ -746,7 +746,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
assert(cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL);
if ((decompress_dcc && radv_dcc_enabled(image, subresourceRange->baseMipLevel)) ||
(!(radv_image_has_fmask(image) && !image->tc_compatible_cmask))) {
(!(radv_image_has_fmask(image) && !image->tc_compatible_cmask) && image->fce_pred_offset)) {
use_predication = true;
}