Rb. This also fixes simulation errors on gen9; might be worth mentioning that.

On September 21, 2018 19:12:28 Nanley Chery <[email protected]> wrote:

Avoid an ICL fulsim failure. Makes 336 crucible tests under
func.depthstencil.stencil-triangles.clear-0x17.ref-0x17.* go from fail
to pass with the simulator.

Fixes: 2cc3445eb24af469537911277f7bc4e73a6c5670
      ("anv/cmd_buffer: Decide whether or not to HiZ clear up-front")
---
src/intel/vulkan/genX_cmd_buffer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index a9a8a41ac9d..5f5f2c114ff 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -374,12 +374,6 @@ depth_stencil_attachment_compute_aux_usage(struct anv_device *device,
      return;
   }

-   if (!(att_state->pending_clear_aspects & VK_IMAGE_ASPECT_DEPTH_BIT)) {
-      /* If we're just clearing stencil, we can always HiZ clear */
-      att_state->fast_clear = true;
-      return;
-   }
-
   /* Default to false for now */
   att_state->fast_clear = false;

@@ -387,6 +381,12 @@ depth_stencil_attachment_compute_aux_usage(struct anv_device *device,
   if (!(iview->image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT))
      return;

+   if (att_state->pending_clear_aspects == VK_IMAGE_ASPECT_STENCIL_BIT) {
+      /* If we're just clearing stencil, we can always HiZ clear */
+      att_state->fast_clear = true;
+      return;
+   }
+
   const enum isl_aux_usage first_subpass_aux_usage =
      anv_layout_to_aux_usage(&device->info, iview->image,
                              VK_IMAGE_ASPECT_DEPTH_BIT,
--
2.19.0



_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to