Otherwise a shader invocation would read the value which should have
been set AFTER this shader invocation.
Fixes tests:
dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers
dEQP-VK.rasterization.rasterization_order_attachment_access.stencil.samples_1.multi_draw_barriers
Fixes:
71595a189a0c372efd520ad51866ca57aa83298c
("tu: Fix feedback loops in sysmem mode")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15106>
* setting the SINGLE_PRIM_MODE field to the same value that the blob does
* for advanced_blend in sysmem mode if a feedback loop is detected.
*/
- if (subpass->feedback) {
+ if (subpass->feedback_loop_color || subpass->feedback_loop_ds) {
tu_cond_exec_start(cs, CP_COND_EXEC_0_RENDER_MODE_SYSMEM);
tu_cs_emit_write_reg(cs, REG_A6XX_GRAS_SC_CNTL,
A6XX_GRAS_SC_CNTL_CCUSINGLECACHELINESIZE(2) |
bool depth_write = tu6_writes_depth(cmd, depth_test_enable);
bool stencil_write = tu6_writes_stencil(cmd);
- if (cmd->state.pipeline->lrz.fs_has_kill &&
+ if ((cmd->state.pipeline->lrz.fs_has_kill ||
+ cmd->state.pipeline->subpass_feedback_loop_ds) &&
(depth_write || stencil_write)) {
zmode = cmd->state.lrz.valid ? A6XX_EARLY_LRZ_LATE_Z : A6XX_LATE_Z;
}
continue;
for (unsigned k = 0; k < subpass->input_count; k++) {
if (subpass->input_attachments[k].attachment == a) {
- subpass->feedback = true;
+ subpass->feedback_loop_color = true;
break;
}
}
for (unsigned k = 0; k < subpass->input_count; k++) {
if (subpass->input_attachments[k].attachment ==
subpass->depth_stencil_attachment.attachment) {
- subpass->feedback = true;
+ subpass->feedback_loop_ds = true;
break;
}
}
VkFormat depth_attachment_format;
uint32_t render_components;
uint32_t multiview_mask;
+
+ bool subpass_feedback_loop_ds;
};
static bool
return VK_ERROR_OUT_OF_HOST_MEMORY;
(*pipeline)->layout = builder->layout;
+ (*pipeline)->subpass_feedback_loop_ds = builder->subpass_feedback_loop_ds;
(*pipeline)->executables_mem_ctx = ralloc_context(NULL);
util_dynarray_init(&(*pipeline)->executables, (*pipeline)->executables_mem_ctx);
const struct tu_subpass *subpass =
&pass->subpasses[create_info->subpass];
+ builder->subpass_feedback_loop_ds = subpass->feedback_loop_ds;
+
builder->multiview_mask = subpass->multiview_mask;
builder->rasterizer_discard =
struct tu_lrz_pipeline lrz;
+ bool subpass_feedback_loop_ds;
+
/* Base drawcall cost for sysmem vs gmem autotuner */
uint8_t drawcall_base_cost;
uint32_t resolve_count;
bool resolve_depth_stencil;
- /* True if there is any feedback loop at all. */
- bool feedback;
+ bool feedback_loop_color;
+ bool feedback_loop_ds;
/* True if we must invalidate UCHE thanks to a feedback loop. */
bool feedback_invalidate;