mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
ac: fix visit_ssa_undef() for doubles
V2: use LLVMIntTypeInContext()
Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
3153d74207
commit
3bccb5dba9
1 changed files with 3 additions and 2 deletions
|
|
@ -5055,12 +5055,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 = LLVMIntTypeInContext(ctx->ac.context, instr->def.bit_size);
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue