Module: Mesa
Branch: master
Commit: 64225c4f962c2640dd280d3817517b75c7188622
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=64225c4f962c2640dd280d3817517b75c7188622

Author: Timur Kristóf <[email protected]>
Date:   Wed Apr  1 15:55:41 2020 +0200

aco/ngg: Run GS_ALLOC_REQ on priority 3 for NGG VS and TES.

It is recommended to do this as quickly as possible.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3576>

---

 src/amd/compiler/aco_instruction_selection.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index f287679cb23..bd95d096bd2 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -10323,6 +10323,9 @@ void ngg_emit_sendmsg_gs_alloc_req(isel_context *ctx)
 {
    Builder bld(ctx->program, ctx->block);
 
+   /* It is recommended to do the GS_ALLOC_REQ as soon and as quickly as 
possible, so we set the maximum priority (3). */
+   bld.sopp(aco_opcode::s_setprio, -1u, 0x3u);
+
    /* Get the id of the current wave within the threadgroup (workgroup) */
    Builder::Result wave_id_in_tg = bld.sop2(aco_opcode::s_bfe_u32, 
bld.def(s1), bld.def(s1, scc),
                                             get_arg(ctx, 
ctx->args->merged_wave_info), Operand(24u | (4u << 16)));
@@ -10350,6 +10353,9 @@ void ngg_emit_sendmsg_gs_alloc_req(isel_context *ctx)
    /* Request the SPI to allocate space for the primitives and vertices that 
will be exported by the threadgroup. */
    bld.sopp(aco_opcode::s_sendmsg, bld.m0(tmp), -1, sendmsg_gs_alloc_req);
 
+   /* After the GS_ALLOC_REQ is done, reset priority to default (0). */
+   bld.sopp(aco_opcode::s_setprio, -1u, 0x0u);
+
    end_uniform_if(ctx, &ic);
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to