aco: Move s_setprio to correct place after the gs_alloc_req.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 23 Apr 2020 13:53:09 +0000 (15:53 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 17:58:57 +0000 (17:58 +0000)
Previously the setprio was inside the branch, so it would only reset
the priority on the first wave, but not the others.

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

src/amd/compiler/aco_instruction_selection.cpp

index bca192d756446b081a4f383786ea4735b9183208..c83cf00f01a86c29b01a783ba9ca06e804a8c4b9 100644 (file)
@@ -10472,10 +10472,11 @@ 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);
 
+   end_uniform_if(ctx, &ic);
+
    /* After the GS_ALLOC_REQ is done, reset priority to default (0). */
+   bld.reset(ctx->block);
    bld.sopp(aco_opcode::s_setprio, -1u, 0x0u);
-
-   end_uniform_if(ctx, &ic);
 }
 
 Temp ngg_get_prim_exp_arg(isel_context *ctx, unsigned num_vertices, const Temp vtxindex[])