Mesa (master): anv: Set correct fast clear value for depth during blorp operation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 14 21:10:20 UTC 2021


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

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Thu Apr  8 17:10:07 2021 -0700

anv: Set correct fast clear value for depth during blorp operation

Previously, on the platforms which support the indirect clear color
values, we were just setting the clear color address and not enforcing
any clear color values but some of the blorp operations were using the
wrong fast clear value.

With this patch, we make sure to set the correct fast clear color value
during blorp operations.

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9941>

---

 src/intel/vulkan/anv_blorp.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index d974d868ed0..0113b1e7de6 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -268,11 +268,10 @@ get_blorp_surf_for_anv_image(const struct anv_device *device,
             };
             blorp_surf->clear_color_addr =
                anv_to_blorp_address(clear_color_addr);
-         } else {
-            blorp_surf->clear_color = (union isl_color_value) {
-               .f32 = { ANV_HZ_FC_VAL },
-            };
          }
+         blorp_surf->clear_color = (union isl_color_value) {
+            .f32 = { ANV_HZ_FC_VAL },
+         };
       }
    }
 }
@@ -1626,7 +1625,6 @@ anv_image_clear_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
                                    image, VK_IMAGE_ASPECT_DEPTH_BIT,
                                    0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
                                    depth_aux_usage, &depth);
-      depth.clear_color.f32[0] = ANV_HZ_FC_VAL;
    }
 
    struct blorp_surf stencil = {};
@@ -1703,7 +1701,6 @@ anv_image_hiz_op(struct anv_cmd_buffer *cmd_buffer,
                                 image, VK_IMAGE_ASPECT_DEPTH_BIT,
                                 0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
                                 image->planes[plane].aux_usage, &surf);
-   surf.clear_color.f32[0] = ANV_HZ_FC_VAL;
 
    blorp_hiz_op(&batch, &surf, level, base_layer, layer_count, hiz_op);
 
@@ -1734,7 +1731,6 @@ anv_image_hiz_clear(struct anv_cmd_buffer *cmd_buffer,
                                    image, VK_IMAGE_ASPECT_DEPTH_BIT,
                                    0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
                                    image->planes[plane].aux_usage, &depth);
-      depth.clear_color.f32[0] = ANV_HZ_FC_VAL;
    }
 
    struct blorp_surf stencil = {};



More information about the mesa-commit mailing list