summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-24 12:29:30 -0700
committerMatt Turner <[email protected]>2016-05-25 12:44:34 -0700
commit44809f237172b7061223de6915137526c90ef55b (patch)
tree33029512cf6c58bde072b63160eedb16aff9ea88 /src/compiler
parent469a1c56a68e8b2c1d55756868ca1951c383500b (diff)
spirv: Mark default cases unreachable().
Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/vtn_alu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
index 8b9a63ce760..6d98a62ab97 100644
--- a/src/compiler/spirv/vtn_alu.c
+++ b/src/compiler/spirv/vtn_alu.c
@@ -356,6 +356,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
case 2: op = nir_op_bany_inequal2; break;
case 3: op = nir_op_bany_inequal3; break;
case 4: op = nir_op_bany_inequal4; break;
+ default: unreachable("invalid number of components");
}
val->ssa->def = nir_build_alu(&b->nb, op, src[0],
nir_imm_int(&b->nb, NIR_FALSE),
@@ -372,6 +373,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
case 2: op = nir_op_ball_iequal2; break;
case 3: op = nir_op_ball_iequal3; break;
case 4: op = nir_op_ball_iequal4; break;
+ default: unreachable("invalid number of components");
}
val->ssa->def = nir_build_alu(&b->nb, op, src[0],
nir_imm_int(&b->nb, NIR_TRUE),