Module: Mesa Branch: main Commit: 8a33a1390a9f0e98b426c64dcbfc347ddfd55b3e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a33a1390a9f0e98b426c64dcbfc347ddfd55b3e
Author: Rohan Garg <[email protected]> Date: Thu Mar 23 17:46:44 2023 +0100 anv: limit non zero fast clear check to GFX12_CCS_E TGL C0 and above can fast clear to non zero values Signed-off-by: Rohan Garg <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22076> --- src/intel/vulkan/anv_image.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 0d2a099f00b..50caaf9e818 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -344,15 +344,14 @@ can_fast_clear_with_non_zero_color(const struct intel_device_info *devinfo, if (!isl_aux_usage_has_fast_clears(image->planes[plane].aux_usage)) return false; - /* On TGL, if a block of fragment shader outputs match the surface's clear - * color, the HW may convert them to fast-clears (see HSD 14010672564). + /* On TGL (< C0), if a block of fragment shader outputs match the surface's + * clear color, the HW may convert them to fast-clears (see HSD 14010672564). * This can lead to rendering corruptions if not handled properly. We * restrict the clear color to zero to avoid issues that can occur with: * - Texture view rendering (including blorp_copy calls) * - Images with multiple levels or array layers */ - if (devinfo->ver >= 12 && - image->planes[plane].aux_usage == ISL_AUX_USAGE_CCS_E) + if (image->planes[plane].aux_usage == ISL_AUX_USAGE_GFX12_CCS_E) return false; /* Non mutable image, we can fast clear with any color supported by HW.
