Mesa (main): aco: Add storage class for Task Shader payload.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 13:56:51 UTC 2022


Module: Mesa
Branch: main
Commit: cd0dd5d6b7416bd68a2bdc9d50c2d3fa8e2d5a69
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd0dd5d6b7416bd68a2bdc9d50c2d3fa8e2d5a69

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Fri Feb 25 09:22:04 2022 +0100

aco: Add storage class for Task Shader payload.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15161>

---

 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;



More information about the mesa-commit mailing list