summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-02-21 18:28:38 -0800
committerEmil Velikov <[email protected]>2017-03-15 18:54:30 +0000
commit55f9cb39858a3122621ede1010331b729cfeb2a8 (patch)
tree6ab08b93430dbbcc66dc06cdf1c8181b59dac85d /src/intel
parent579586c9267d25e06e408668e4e591399c3ff8c3 (diff)
anv/blorp/clear_subpass: Only set surface clear color for fast clears
Not all clear colors are valid. In particular, on Broadwell and earlier, only 0/1 colors are allowed in surface state. No CTS tests are affected outright by this because, apparently, the CTS coverage for different clear colors is pretty terrible. However, when multisample compression is enabled, we do hit it with CTS tests and this commit prevents regressions when enabling MCS on Broadwell and earlier. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit 42b10b175d5e8dfb9c4c46edbc306e7fac6bd3ec)
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_blorp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 4a4b4791162..19064afba1f 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1197,9 +1197,10 @@ anv_cmd_buffer_clear_subpass(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);
+
blorp_fast_clear(&batch, &surf, iview->isl.format,
iview->isl.base_level,
iview->isl.base_array_layer, fb->layers,
@@ -1222,7 +1223,7 @@ anv_cmd_buffer_clear_subpass(struct anv_cmd_buffer *cmd_buffer)
render_area.offset.x, render_area.offset.y,
render_area.offset.x + render_area.extent.width,
render_area.offset.y + render_area.extent.height,
- surf.clear_color, NULL);
+ vk_to_isl_color(att_state->clear_value.color), NULL);
}
att_state->pending_clear_aspects = 0;