nv50: Fix uninitialized var warnings from using assert() as unreachable().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462>
This commit is contained in:
Eric Anholt
2020-08-25 11:28:47 -07:00
committed by Marge Bot
parent 689e36ebfe
commit ca73c3bc59
2 changed files with 3 additions and 4 deletions

View File

@@ -927,7 +927,7 @@ gv100_interpApply(const FixupEntry *entry, uint32_t *code, const FixupData& data
case NV50_IR_INTERP_DEFAULT : sample = 0; break;
case NV50_IR_INTERP_CENTROID: sample = 1; break;
case NV50_IR_INTERP_OFFSET : sample = 2; break;
default: assert(!"invalid sample mode");
default: unreachable("invalid sample mode");
}
int interp;
@@ -936,7 +936,7 @@ gv100_interpApply(const FixupEntry *entry, uint32_t *code, const FixupData& data
case NV50_IR_INTERP_PERSPECTIVE: interp = 0; break;
case NV50_IR_INTERP_FLAT : interp = 1; break;
case NV50_IR_INTERP_SC : interp = 2; break;
default: assert(!"invalid ipa mode");
default: unreachable("invalid ipa mode");
}
code[loc + 2] &= ~(0xf << 12);

View File

@@ -132,8 +132,7 @@ GV100LegalizeSSA::handleLOP2(Instruction *i)
case OP_OR : subOp = src0 | src1; break;
case OP_XOR: subOp = src0 ^ src1; break;
default:
assert(!"invalid LOP2 opcode");
break;
unreachable("invalid LOP2 opcode");
}
bld.mkOp3(OP_LOP3_LUT, TYPE_U32, i->getDef(0), i->getSrc(0), i->getSrc(1),