anv: Only copy clear dwords if we're rendering to the first slice
authorJason Ekstrand <jason.ekstrand@intel.com>
Sun, 11 Feb 2018 06:10:03 +0000 (22:10 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 21 Feb 2018 20:47:17 +0000 (12:47 -0800)
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 939a795c2b1300d96de968ced74ff0d0ed25c1be..8015a42c154a84a8177d3704f1926619b8b54a0f 100644 (file)
@@ -3462,7 +3462,10 @@ cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
          assert(att_state->pending_clear_aspects == 0);
       }
 
-      if (att_state->pending_load_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
+      if ((att_state->pending_load_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) &&
+          image->planes[0].aux_surface.isl.size > 0 &&
+          iview->planes[0].isl.base_level == 0 &&
+          iview->planes[0].isl.base_array_layer == 0) {
          if (att_state->aux_usage != ISL_AUX_USAGE_NONE) {
             genX(copy_fast_clear_dwords)(cmd_buffer, att_state->color.state,
                                          image, VK_IMAGE_ASPECT_COLOR_BIT,