diff options
author | Rob Clark <[email protected]> | 2015-06-27 10:07:18 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-06-30 12:13:44 -0400 |
commit | dc7e6463d3ec6980f1517ff10048e0dbf5bb38ad (patch) | |
tree | f21ed09ec4103dff4134e5db9b0c9903c3a10bc8 /src/glsl | |
parent | 00b6b41482985ba4a81fbb479a47c06ec83f3797 (diff) |
nir: cleanup open-coded instruction casts
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/nir_lower_alu_to_scalar.c | 2 | ||||
-rw-r--r-- | src/glsl/nir/nir_lower_vec_to_movs.c | 2 | ||||
-rw-r--r-- | src/glsl/nir/nir_search.c | 2 |
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 |