radv: add RADV_FMASK_COMPRESSION_PARTIAL

RADV_FMASK_COMPRESSION_PARTIAL means the fmask is decompressed but not
expanded.  It is desired for sampling when the cmask is not
TC-compatible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21615>
This commit is contained in:
Chia-I Wu
2023-03-07 14:07:35 -08:00
committed by Marge Bot
parent 3cf7ac4e9c
commit bd5fb29db6
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -2465,6 +2465,12 @@ radv_layout_fmask_compression(const struct radv_device *device, const struct rad
if (layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && (queue_mask & (1u << RADV_QUEUE_COMPUTE)))
return RADV_FMASK_COMPRESSION_NONE;
if (layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ||
layout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) {
return radv_image_is_tc_compat_cmask(image) ? RADV_FMASK_COMPRESSION_FULL :
RADV_FMASK_COMPRESSION_PARTIAL;
}
/* Only compress concurrent images if TC-compat CMASK is enabled (no FMASK decompression). */
return (queue_mask == (1u << RADV_QUEUE_GENERAL) || radv_image_is_tc_compat_cmask(image)) ?
RADV_FMASK_COMPRESSION_FULL : RADV_FMASK_COMPRESSION_NONE;
+1
View File
@@ -2549,6 +2549,7 @@ bool radv_layout_dcc_compressed(const struct radv_device *device, const struct r
enum radv_fmask_compression {
RADV_FMASK_COMPRESSION_NONE,
RADV_FMASK_COMPRESSION_PARTIAL,
RADV_FMASK_COMPRESSION_FULL,
};