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

Author: Lionel Landwerlin <[email protected]>
Date:   Sat Aug  5 12:31:58 2023 +0300

anv: enable INTEL_DEBUG=nofc

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Sagar Ghuge <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24510>

---

 src/intel/vulkan/anv_blorp.c | 6 ++++++
 src/intel/vulkan/anv_image.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index c5833001f48..8553327626a 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1148,6 +1148,9 @@ can_fast_clear_color_att(struct anv_cmd_buffer 
*cmd_buffer,
                          const VkClearAttachment *attachment,
                          uint32_t rectCount, const VkClearRect *pRects)
 {
+   if (INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
+      return false;
+
    /* We don't support fast clearing with conditional rendering at the
     * moment. All the tracking done around fast clears (clear color updates
     * and fast-clear type updates) happens unconditionally.
@@ -1696,6 +1699,9 @@ can_hiz_clear_att(struct anv_cmd_buffer *cmd_buffer,
                   const VkClearAttachment *attachment,
                   uint32_t rectCount, const VkClearRect *pRects)
 {
+   if (INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
+      return false;
+
    /* From Bspec's section MI_PREDICATE:
     *
     *    "The MI_PREDICATE command is used to control the Predicate state bit,
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index c7ba03cf5fd..a4f9a31063d 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -2608,6 +2608,9 @@ anv_can_hiz_clear_ds_view(struct anv_device *device,
                           float depth_clear_value,
                           VkRect2D render_area)
 {
+   if (INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
+      return false;
+
    /* If we're just clearing stencil, we can always HiZ clear */
    if (!(clear_aspects & VK_IMAGE_ASPECT_DEPTH_BIT))
       return true;
@@ -2668,6 +2671,9 @@ anv_can_fast_clear_color_view(struct anv_device *device,
                               uint32_t num_layers,
                               VkRect2D render_area)
 {
+   if (INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
+      return false;
+
    if (iview->planes[0].isl.base_array_layer >=
        anv_image_aux_layers(iview->image, VK_IMAGE_ASPECT_COLOR_BIT,
                             iview->planes[0].isl.base_level))

Reply via email to