summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/nir_lower_alu_to_scalar.c2
-rw-r--r--src/glsl/nir/nir_lower_vec_to_movs.c2
-rw-r--r--src/glsl/nir/nir_search.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_lower_alu_to_scalar.c b/src/glsl/nir/nir_lower_alu_to_scalar.c
index 25bba4ef0b6..5d15fb2bc32 100644
--- a/src/glsl/nir/nir_lower_alu_to_scalar.c
+++ b/src/glsl/nir/nir_lower_alu_to_scalar.c
@@ -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;
diff --git a/src/glsl/nir/nir_lower_vec_to_movs.c b/src/glsl/nir/nir_lower_vec_to_movs.c
index 602853ea665..e6d522f88ce 100644
--- a/src/glsl/nir/nir_lower_vec_to_movs.c
+++ b/src/glsl/nir/nir_lower_vec_to_movs.c
@@ -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:
diff --git a/src/glsl/nir/nir_search.c b/src/glsl/nir/nir_search.c
index 0c4e48ce965..c33d6c3eb84 100644
--- a/src/glsl/nir/nir_search.c
+++ b/src/glsl/nir/nir_search.c
@@ -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