radv: Mark all formats as DCC compatible with each other on gfx11.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419>
This commit is contained in:
committed by
Marge Bot
parent
eb117a4711
commit
9c391fe47e
@@ -2084,13 +2084,18 @@ radv_get_dcc_channel_type(const struct util_format_description *desc, enum dcc_c
|
||||
|
||||
/* Return if it's allowed to reinterpret one format as another with DCC enabled. */
|
||||
bool
|
||||
radv_dcc_formats_compatible(VkFormat format1, VkFormat format2, bool *sign_reinterpret)
|
||||
radv_dcc_formats_compatible(enum amd_gfx_level gfx_level, VkFormat format1, VkFormat format2,
|
||||
bool *sign_reinterpret)
|
||||
{
|
||||
const struct util_format_description *desc1, *desc2;
|
||||
enum dcc_channel_type type1, type2;
|
||||
unsigned size1, size2;
|
||||
int i;
|
||||
|
||||
/* All formats are compatible on GFX11. */
|
||||
if (gfx_level >= GFX11)
|
||||
return true;
|
||||
|
||||
if (format1 == format2)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ radv_are_formats_dcc_compatible(const struct radv_physical_device *pdev, const v
|
||||
if (format_list->pViewFormats[i] == VK_FORMAT_UNDEFINED)
|
||||
continue;
|
||||
|
||||
if (!radv_dcc_formats_compatible(format, format_list->pViewFormats[i],
|
||||
sign_reinterpret))
|
||||
if (!radv_dcc_formats_compatible(pdev->rad_info.gfx_level, format,
|
||||
format_list->pViewFormats[i], sign_reinterpret))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -492,7 +492,8 @@ copy_image(struct radv_cmd_buffer *cmd_buffer, struct radv_image *src_image,
|
||||
bool need_dcc_sign_reinterpret = false;
|
||||
|
||||
if (!src_compressed ||
|
||||
(radv_dcc_formats_compatible(b_src.format, b_dst.format, &need_dcc_sign_reinterpret) &&
|
||||
(radv_dcc_formats_compatible(cmd_buffer->device->physical_device->rad_info.gfx_level,
|
||||
b_src.format, b_dst.format, &need_dcc_sign_reinterpret) &&
|
||||
!need_dcc_sign_reinterpret)) {
|
||||
b_src.format = b_dst.format;
|
||||
} else if (!dst_compressed) {
|
||||
|
||||
@@ -2101,7 +2101,8 @@ bool radv_is_storage_image_format_supported(struct radv_physical_device *physica
|
||||
VkFormat format);
|
||||
bool radv_is_colorbuffer_format_supported(const struct radv_physical_device *pdevice,
|
||||
VkFormat format, bool *blendable);
|
||||
bool radv_dcc_formats_compatible(VkFormat format1, VkFormat format2, bool *sign_reinterpret);
|
||||
bool radv_dcc_formats_compatible(enum amd_gfx_level gfx_level, VkFormat format1, VkFormat format2,
|
||||
bool *sign_reinterpret);
|
||||
bool radv_is_atomic_format_supported(VkFormat format);
|
||||
bool radv_device_supports_etc(struct radv_physical_device *physical_device);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user