mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
nir/builder: Add a bit size field to nir_ssa_undef
This commit is contained in:
parent
b50f7f0011
commit
d2eee52a65
2 changed files with 4 additions and 3 deletions
|
|
@ -75,10 +75,11 @@ nir_builder_cf_insert(nir_builder *build, nir_cf_node *cf)
|
|||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_ssa_undef(nir_builder *build, unsigned num_components)
|
||||
nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size)
|
||||
{
|
||||
nir_ssa_undef_instr *undef =
|
||||
nir_ssa_undef_instr_create(build->shader, num_components);
|
||||
undef->def.bit_size = bit_size;
|
||||
if (!undef)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1496,7 +1496,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
|
|||
assert(w[5] == SpvImageOperandsSampleMask);
|
||||
image.sample = vtn_ssa_value(b, w[6])->def;
|
||||
} else {
|
||||
image.sample = nir_ssa_undef(&b->nb, 1);
|
||||
image.sample = nir_ssa_undef(&b->nb, 1, 32);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1511,7 +1511,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
|
|||
assert(w[4] == SpvImageOperandsSampleMask);
|
||||
image.sample = vtn_ssa_value(b, w[5])->def;
|
||||
} else {
|
||||
image.sample = nir_ssa_undef(&b->nb, 1);
|
||||
image.sample = nir_ssa_undef(&b->nb, 1, 32);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue