Module: Mesa
Branch: main
Commit: c70c269b16b62b68e7908a3c14e2b5984fedc5ed
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c70c269b16b62b68e7908a3c14e2b5984fedc5ed

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Thu Dec  7 16:01:20 2023 +0100

radv: remove useless check for TC-compat CMASK images during fb emission

The FMASK decompression only happens for images with FMASK and without
TC-compat CMASK, so both can never be TRUE.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26575>

---

 src/amd/vulkan/meta/radv_meta.h  | 14 --------------
 src/amd/vulkan/radv_cmd_buffer.c |  3 +--
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/src/amd/vulkan/meta/radv_meta.h b/src/amd/vulkan/meta/radv_meta.h
index f42e954f4b7..0774c4272db 100644
--- a/src/amd/vulkan/meta/radv_meta.h
+++ b/src/amd/vulkan/meta/radv_meta.h
@@ -226,20 +226,6 @@ void radv_meta_decode_etc(struct radv_cmd_buffer 
*cmd_buffer, struct radv_image
 void radv_meta_decode_astc(struct radv_cmd_buffer *cmd_buffer, struct 
radv_image *image, VkImageLayout layout,
                            const VkImageSubresourceLayers *subresource, 
VkOffset3D offset, VkExtent3D extent);
 
-/**
- * Return whether the bound pipeline is the FMASK decompress pass.
- */
-static inline bool
-radv_is_fmask_decompress_pipeline(struct radv_cmd_buffer *cmd_buffer)
-{
-   struct radv_graphics_pipeline *pipeline = 
cmd_buffer->state.graphics_pipeline;
-
-   if (!pipeline)
-      return false;
-
-   return pipeline->custom_blend_mode == V_028808_CB_FMASK_DECOMPRESS;
-}
-
 /**
  * Return whether the bound pipeline is the DCC decompress pass.
  */
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 1c845a3dab7..ac278dab129 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2766,8 +2766,7 @@ radv_emit_fb_color_state(struct radv_cmd_buffer 
*cmd_buffer, int index, struct r
       cb_color_info &= C_028C70_COMPRESSION;
    }
 
-   if (radv_image_is_tc_compat_cmask(image) &&
-       (radv_is_fmask_decompress_pipeline(cmd_buffer) || 
radv_is_dcc_decompress_pipeline(cmd_buffer))) {
+   if (radv_image_is_tc_compat_cmask(image) && 
radv_is_dcc_decompress_pipeline(cmd_buffer)) {
       /* If this bit is set, the FMASK decompression operation
        * doesn't occur (DCC_COMPRESS also implies FMASK_DECOMPRESS).
        */

Reply via email to