aco: add pending_lds_access option for insert waitcnt

For tcs epilog to add p_barrier at the beginning to sync
main shader part tess factor LDS write.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>
This commit is contained in:
Qiang Yu
2023-08-15 15:24:09 +08:00
committed by Marge Bot
parent 5cf6f4f9a7
commit a2484b20f9
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -1049,6 +1049,11 @@ insert_wait_states(Program* program)
std::stack<unsigned, std::vector<unsigned>> loop_header_indices;
unsigned loop_progress = 0;
if (program->pending_lds_access) {
update_barrier_imm(in_ctx[0], get_counters_for_event(event_lds), event_lds,
memory_sync_info(storage_shared));
}
for (Definition def : program->args_pending_vmem) {
update_counters(in_ctx[0], event_vmem);
insert_wait_entry(in_ctx[0], def, event_vmem);
+3
View File
@@ -2145,6 +2145,9 @@ public:
std::vector<Definition> args_pending_vmem;
/* For shader part with previous shader part that has lds access. */
bool pending_lds_access = false;
struct {
FILE* output = stderr;
bool shorten_messages = false;