[Mesa-dev] [PATCH 3/3] ac/nir_to_llvm: fix component packing for double outputs

Marek Olšák maraeo at gmail.com
Tue Mar 27 22:24:43 UTC 2018


For the series:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Mar 20, 2018 at 11:50 PM, Timothy Arceri <tarceri at itsqueeze.com>
wrote:

> We need to wait until after the writemask is widened before we
> adjust it for component packing.
>
> Together with the previous patch this fixes a number of
> arb_enhanced_layouts component layout piglit tests.
> ---
>  src/amd/common/ac_nir_to_llvm.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_
> llvm.c
> index 1fd2745201..a1cbf65edb 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1793,7 +1793,7 @@ visit_store_var(struct ac_nir_context *ctx,
>         int idx = instr->variables[0]->var->data.driver_location;
>         unsigned comp = instr->variables[0]->var->data.location_frac;
>         LLVMValueRef src = ac_to_float(&ctx->ac, get_src(ctx,
> instr->src[0]));
> -       int writemask = instr->const_index[0] << comp;
> +       int writemask = instr->const_index[0];
>         LLVMValueRef indir_index;
>         unsigned const_index;
>         get_deref_offset(ctx, instr->variables[0], false,
> @@ -1808,6 +1808,8 @@ visit_store_var(struct ac_nir_context *ctx,
>                 writemask = widen_mask(writemask, 2);
>         }
>
> +       writemask = writemask << comp;
> +
>         switch (instr->variables[0]->var->data.mode) {
>         case nir_var_shader_out:
>
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180327/3c6606bb/attachment.html>


More information about the mesa-dev mailing list