Asserts: break/crash program, fit to style guide; log.h->assert.h

Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
This commit is contained in:
archshift 2015-01-20 17:16:47 -08:00
parent 168eb27aee
commit ef24e72b26
88 changed files with 135 additions and 217 deletions

View file

@ -146,13 +146,10 @@ static void ProcessShaderCode(VertexShaderState& state) {
case Instruction::OpCodeType::Arithmetic:
{
bool is_inverted = 0 != (instr.opcode.GetInfo().subtype & Instruction::OpCodeInfo::SrcInversed);
if (is_inverted) {
// TODO: We don't really support this properly: For instance, the address register
// offset needs to be applied to SRC2 instead, etc.
// For now, we just abort in this situation.
LOG_CRITICAL(HW_GPU, "Bad condition...");
exit(0);
}
// TODO: We don't really support this properly: For instance, the address register
// offset needs to be applied to SRC2 instead, etc.
// For now, we just abort in this situation.
ASSERT_MSG(!is_inverted, "Bad condition...");
const int address_offset = (instr.common.address_register_index == 0)
? 0 : state.address_registers[instr.common.address_register_index - 1];
@ -342,7 +339,7 @@ static void ProcessShaderCode(VertexShaderState& state) {
default:
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x%02x (%s): 0x%08x",
(int)instr.opcode.Value(), instr.opcode.GetInfo().name, instr.hex);
_dbg_assert_(HW_GPU, 0);
DEBUG_ASSERT(false);
break;
}