From cd0dd5d6b7416bd68a2bdc9d50c2d3fa8e2d5a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 25 Feb 2022 09:22:04 +0100 Subject: [PATCH] aco: Add storage class for Task Shader payload. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_ir.h | 7 ++++--- src/amd/compiler/aco_print_ir.cpp | 2 ++ src/amd/compiler/aco_scheduler.cpp | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index e716ad295d4..fa4f885c873 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -138,9 +138,10 @@ enum storage_class : uint8_t { storage_image = 0x4, storage_shared = 0x8, /* or TCS output */ storage_vmem_output = 0x10, /* GS or TCS output stores using VMEM */ - storage_scratch = 0x20, - storage_vgpr_spill = 0x40, - storage_count = 8, + storage_task_payload = 0x20,/* Task-Mesh payload */ + storage_scratch = 0x40, + storage_vgpr_spill = 0x80, + storage_count = 8, /* not counting storage_none */ }; enum memory_semantics : uint8_t { diff --git a/src/amd/compiler/aco_print_ir.cpp b/src/amd/compiler/aco_print_ir.cpp index e3114b7c9c0..f650de37791 100644 --- a/src/amd/compiler/aco_print_ir.cpp +++ b/src/amd/compiler/aco_print_ir.cpp @@ -219,6 +219,8 @@ print_storage(storage_class storage, FILE* output) printed += fprintf(output, "%simage", printed ? "," : ""); if (storage & storage_shared) printed += fprintf(output, "%sshared", printed ? "," : ""); + if (storage & storage_task_payload) + printed += fprintf(output, "%stask_payload", printed ? "," : ""); if (storage & storage_vmem_output) printed += fprintf(output, "%svmem_output", printed ? "," : ""); if (storage & storage_scratch) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index bfa08f5b725..953d8779917 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -613,7 +613,8 @@ perform_hazard_query(hazard_query* query, Instruction* instr, bool upwards) /* Don't move memory accesses to before control barriers. I don't think * this is necessary for the Vulkan memory model, but it might be for GLSL450. */ unsigned control_classes = - storage_buffer | storage_atomic_counter | storage_image | storage_shared; + storage_buffer | storage_atomic_counter | storage_image | storage_shared | + storage_task_payload; if (first->has_control_barrier && ((second->access_atomic | second->access_relaxed) & control_classes)) return hazard_fail_barrier;