mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
nir: cleanup open-coded instruction casts
Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
00b6b41482
commit
dc7e6463d3
3 changed files with 3 additions and 3 deletions
|
|
@ -164,7 +164,7 @@ lower_alu_to_scalar_block(nir_block *block, void *data)
|
|||
{
|
||||
nir_foreach_instr_safe(block, instr) {
|
||||
if (instr->type == nir_instr_type_alu)
|
||||
lower_alu_instr_scalar((nir_alu_instr *)instr, data);
|
||||
lower_alu_instr_scalar(nir_instr_as_alu(instr), data);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ lower_vec_to_movs_block(nir_block *block, void *mem_ctx)
|
|||
if (instr->type != nir_instr_type_alu)
|
||||
continue;
|
||||
|
||||
nir_alu_instr *vec = (nir_alu_instr *)instr;
|
||||
nir_alu_instr *vec = nir_instr_as_alu(instr);
|
||||
|
||||
switch (vec->op) {
|
||||
case nir_op_vec2:
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ src_is_bool(nir_src src)
|
|||
return false;
|
||||
if (src.ssa->parent_instr->type != nir_instr_type_alu)
|
||||
return false;
|
||||
return alu_instr_is_bool((nir_alu_instr *)src.ssa->parent_instr);
|
||||
return alu_instr_is_bool(nir_instr_as_alu(src.ssa->parent_instr));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue