anv/blorp: Only set a clear color for resolves if fast-cleared
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 3 Mar 2017 07:03:03 +0000 (23:03 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Mar 2017 14:36:20 +0000 (07:36 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_blorp.c

index 2bab0d076f1ad2a365d136e1ffd1c1913f17f02e..9b9995c95c7d382fe894e92315297f9e9447c770 100644 (file)
@@ -1508,7 +1508,8 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,
    struct blorp_surf surf;
    get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_COLOR_BIT,
                                 att_state->aux_usage, &surf);
-   surf.clear_color = vk_to_isl_color(att_state->clear_value.color);
+   if (att_state->fast_clear)
+      surf.clear_color = vk_to_isl_color(att_state->clear_value.color);
 
    /* From the Sky Lake PRM Vol. 7, "Render Target Resolve":
     *