diff options
author | Matt Turner <[email protected]> | 2015-02-10 11:21:47 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-02-10 17:48:31 -0800 |
commit | bb1e0071572d491be37d7dfb3841f48af69f6ede (patch) | |
tree | 0be228fbe010d3557708baa3ca56cdd1bf3f3058 /src/glsl/nir | |
parent | 942b56ad05e3ae5a924e5b450f25084a332d9c89 (diff) |
nir: Replace assert(0) with unreachable().
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/glsl_to_nir.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index 46cfac39918..e505a1d23b3 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -604,7 +604,7 @@ nir_visitor::visit(ir_call *ir) } else if (strcmp(ir->callee_name(), "__intrinsic_atomic_predecrement") == 0) { op = nir_intrinsic_atomic_counter_dec_var; } else { - assert(0); + unreachable("not reached"); } nir_intrinsic_instr *instr = nir_intrinsic_instr_create(shader, op); @@ -1162,7 +1162,7 @@ nir_visitor::visit(ir_expression *ir) case 2: emit(nir_op_fnoise1_2, dest_size, srcs); break; case 3: emit(nir_op_fnoise1_3, dest_size, srcs); break; case 4: emit(nir_op_fnoise1_4, dest_size, srcs); break; - default: assert(0); break; + default: unreachable("not reached"); } break; case 2: @@ -1171,7 +1171,7 @@ nir_visitor::visit(ir_expression *ir) case 2: emit(nir_op_fnoise2_2, dest_size, srcs); break; case 3: emit(nir_op_fnoise2_3, dest_size, srcs); break; case 4: emit(nir_op_fnoise2_4, dest_size, srcs); break; - default: assert(0); break; + default: unreachable("not reached"); } break; case 3: @@ -1180,7 +1180,7 @@ nir_visitor::visit(ir_expression *ir) case 2: emit(nir_op_fnoise3_2, dest_size, srcs); break; case 3: emit(nir_op_fnoise3_3, dest_size, srcs); break; case 4: emit(nir_op_fnoise3_4, dest_size, srcs); break; - default: assert(0); break; + default: unreachable("not reached"); } break; case 4: @@ -1189,7 +1189,7 @@ nir_visitor::visit(ir_expression *ir) case 2: emit(nir_op_fnoise4_2, dest_size, srcs); break; case 3: emit(nir_op_fnoise4_3, dest_size, srcs); break; case 4: emit(nir_op_fnoise4_4, dest_size, srcs); break; - default: assert(0); break; + default: unreachable("not reached"); } break; default: @@ -1517,7 +1517,7 @@ nir_visitor::visit(ir_expression *ir) case 2: emit(nir_op_vec2, dest_size, srcs); break; case 3: emit(nir_op_vec3, dest_size, srcs); break; case 4: emit(nir_op_vec4, dest_size, srcs); break; - default: assert(0); break; + default: unreachable("not reached"); } break; @@ -1627,7 +1627,7 @@ nir_visitor::visit(ir_texture *ir) instr->dest_type = nir_type_unsigned; break; default: - assert(0); + unreachable("not reached"); } ir->sampler->accept(this); |