From 64225c4f962c2640dd280d3817517b75c7188622 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Wed, 1 Apr 2020 15:55:41 +0200 Subject: [PATCH] aco/ngg: Run GS_ALLOC_REQ on priority 3 for NGG VS and TES. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It is recommended to do this as quickly as possible. Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann Part-of: --- 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); } -- 2.30.2