@@ -598,9 +598,7 @@ SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layou
598
598
if (type == *fContext .fTypes .fVoid ) {
599
599
this ->writeInstruction (SpvOpTypeVoid, result, fConstantBuffer );
600
600
} else {
601
- #ifdef SK_DEBUG
602
- ABORT (" invalid type: %s" , type.description ().c_str ());
603
- #endif
601
+ SkDEBUGFAILF (" invalid type: %s" , type.description ().c_str ());
604
602
}
605
603
}
606
604
fTypeMap [key] = result;
@@ -723,9 +721,7 @@ SpvId SPIRVCodeGenerator::writeExpression(const Expression& expr, OutputStream&
723
721
case Expression::Kind::kIndex :
724
722
return this ->writeIndexExpression (expr.as <IndexExpression>(), out);
725
723
default :
726
- #ifdef SK_DEBUG
727
- ABORT (" unsupported expression: %s" , expr.description ().c_str ());
728
- #endif
724
+ SkDEBUGFAILF (" unsupported expression: %s" , expr.description ().c_str ());
729
725
break ;
730
726
}
731
727
return -1 ;
@@ -2577,9 +2573,7 @@ SpvId SPIRVCodeGenerator::writePrefixExpression(const PrefixExpression& p, Outpu
2577
2573
} else if (is_signed (fContext , type)) {
2578
2574
this ->writeInstruction (SpvOpSNegate, typeId, result, expr, out);
2579
2575
} else {
2580
- #ifdef SK_DEBUG
2581
- ABORT (" unsupported prefix expression %s" , p.description ().c_str ());
2582
- #endif
2576
+ SkDEBUGFAILF (" unsupported prefix expression %s" , p.description ().c_str ());
2583
2577
}
2584
2578
this ->writePrecisionModifier (type, result);
2585
2579
return result;
@@ -2618,9 +2612,7 @@ SpvId SPIRVCodeGenerator::writePrefixExpression(const PrefixExpression& p, Outpu
2618
2612
return result;
2619
2613
}
2620
2614
default :
2621
- #ifdef SK_DEBUG
2622
- ABORT (" unsupported prefix expression: %s" , p.description ().c_str ());
2623
- #endif
2615
+ SkDEBUGFAILF (" unsupported prefix expression: %s" , p.description ().c_str ());
2624
2616
return -1 ;
2625
2617
}
2626
2618
}
@@ -2644,9 +2636,7 @@ SpvId SPIRVCodeGenerator::writePostfixExpression(const PostfixExpression& p, Out
2644
2636
return result;
2645
2637
}
2646
2638
default :
2647
- #ifdef SK_DEBUG
2648
- ABORT (" unsupported postfix expression %s" , p.description ().c_str ());
2649
- #endif
2639
+ SkDEBUGFAILF (" unsupported postfix expression %s" , p.description ().c_str ());
2650
2640
return -1 ;
2651
2641
}
2652
2642
}
@@ -3028,9 +3018,7 @@ void SPIRVCodeGenerator::writeStatement(const Statement& s, OutputStream& out) {
3028
3018
this ->writeInstruction (SpvOpKill, out);
3029
3019
break ;
3030
3020
default :
3031
- #ifdef SK_DEBUG
3032
- ABORT (" unsupported statement: %s" , s.description ().c_str ());
3033
- #endif
3021
+ SkDEBUGFAILF (" unsupported statement: %s" , s.description ().c_str ());
3034
3022
break ;
3035
3023
}
3036
3024
}
0 commit comments