[Mesa-dev] [PATCH] ac: fix visit_ssa_undef() for doubles
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jan 22 12:03:36 UTC 2018
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 18.01.2018 02:03, Timothy Arceri wrote:
> Fixes: f4e499ec7914 "radv: add initial non-conformant radv vulkan driver"
> ---
> src/amd/common/ac_nir_to_llvm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 5d582cb0ed..43486fdd6c 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -5052,12 +5052,13 @@ static void visit_ssa_undef(struct ac_nir_context *ctx,
> const nir_ssa_undef_instr *instr)
> {
> unsigned num_components = instr->def.num_components;
> + LLVMTypeRef type = instr->def.bit_size == 32 ? ctx->ac.i32 : ctx->ac.i64;
> LLVMValueRef undef;
>
> if (num_components == 1)
> - undef = LLVMGetUndef(ctx->ac.i32);
> + undef = LLVMGetUndef(type);
> else {
> - undef = LLVMGetUndef(LLVMVectorType(ctx->ac.i32, num_components));
> + undef = LLVMGetUndef(LLVMVectorType(type, num_components));
> }
> _mesa_hash_table_insert(ctx->defs, &instr->def, undef);
> }
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list