From: Timur Kristóf Date: Wed, 1 Apr 2020 13:55:41 +0000 (+0200) Subject: aco/ngg: Run GS_ALLOC_REQ on priority 3 for NGG VS and TES. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64225c4f962c2640dd280d3817517b75c7188622;p=mesa.git 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 Reviewed-by: Daniel Schürmann Part-of: --- 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); }