[Mesa-dev] [PATCH] radeonsi: make use of ac_init_exec_full_mask()
Marek Olšák
maraeo at gmail.com
Tue Dec 26 17:20:02 UTC 2017
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Dec 13, 2017 at 1:59 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Similar to si_init_exec_full_mask().
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/drivers/radeonsi/si_shader.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 0077054749..41f588052e 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -5759,14 +5759,6 @@ static void si_count_scratch_private_memory(struct si_shader_context *ctx)
> }
> }
>
> -static void si_init_exec_full_mask(struct si_shader_context *ctx)
> -{
> - LLVMValueRef full_mask = LLVMConstInt(ctx->i64, ~0ull, 0);
> - lp_build_intrinsic(ctx->ac.builder,
> - "llvm.amdgcn.init.exec", ctx->voidt,
> - &full_mask, 1, LP_FUNC_ATTR_CONVERGENT);
> -}
> -
> static void si_init_exec_from_input(struct si_shader_context *ctx,
> unsigned param, unsigned bitoffset)
> {
> @@ -5869,7 +5861,7 @@ static bool si_compile_tgsi_main(struct si_shader_context *ctx,
> } else if (ctx->type == PIPE_SHADER_TESS_CTRL ||
> ctx->type == PIPE_SHADER_GEOMETRY) {
> if (!is_monolithic)
> - si_init_exec_full_mask(ctx);
> + ac_init_exec_full_mask(&ctx->ac);
>
> /* The barrier must execute for all shaders in a
> * threadgroup.
> @@ -6159,7 +6151,7 @@ static void si_build_gs_prolog_function(struct si_shader_context *ctx,
> * mask.
> */
> if (ctx->screen->info.chip_class >= GFX9 && !key->gs_prolog.is_monolithic)
> - si_init_exec_full_mask(ctx);
> + ac_init_exec_full_mask(&ctx->ac);
>
> /* Copy inputs to outputs. This should be no-op, as the registers match,
> * but it will prevent the compiler from overwriting them unintentionally.
> @@ -6311,7 +6303,7 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
> si_get_max_workgroup_size(ctx->shader));
>
> if (is_merged_shader(ctx->shader))
> - si_init_exec_full_mask(ctx);
> + ac_init_exec_full_mask(&ctx->ac);
>
> /* Record the arguments of the function as if they were an output of
> * a previous part.
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list