summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_blorp.c
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2017-03-21 07:16:27 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2017-04-07 07:49:43 +0200
commit1c934bc71b36ec33e59f4b7dc1c7d194585a5bd6 (patch)
treed951cb17a113c7b11749592c924fb1ca1456b6c5 /src/intel/vulkan/anv_blorp.c
parentfd0f539e60f1f34d1a1f97dc978411647f837253 (diff)
anv/blorp: sample input attachments with resolves on BDW
On Broadwell we still need to do a resolve between the subpass that writes and the subpass that reads when there is a self-dependency because HW could not see fast-clears and works on the render cache as if there was regular non-fast-clear surface. Fixes 16 tests on BDW: dEQP-VK.renderpass.formats.*.input.clear.store.self_dep* Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_blorp.c')
-rw-r--r--src/intel/vulkan/anv_blorp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 72a468a744a..d0e859f09d0 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1457,6 +1457,7 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,
* still hot in the cache.
*/
bool found_draw = false;
+ bool self_dep = false;
enum anv_subpass_usage usage = 0;
for (uint32_t s = subpass_idx + 1; s < pass->subpass_count; s++) {
usage |= pass->attachments[att].subpass_usage[s];
@@ -1466,6 +1467,8 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,
* wait to resolve until then.
*/
found_draw = true;
+ if (pass->attachments[att].subpass_usage[s] & ANV_SUBPASS_USAGE_INPUT)
+ self_dep = true;
break;
}
}
@@ -1524,6 +1527,14 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,
* binding this surface to Sampler."
*/
resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL;
+ } else if (cmd_buffer->device->info.gen == 8 && self_dep &&
+ att_state->input_aux_usage == ISL_AUX_USAGE_CCS_D) {
+ /* On Broadwell we still need to do resolves when there is a
+ * self-dependency because HW could not see fast-clears and works
+ * on the render cache as if there was regular non-fast-clear surface.
+ * To avoid any inconsistency, we force the resolve.
+ */
+ resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
}
}