Update spirv-tools to v2021.4 (#4862)

This commit is contained in:
Ben Doherty
2021-11-16 17:13:42 -08:00
committed by GitHub
parent a29b438161
commit 9d29d2e32c
529 changed files with 26363 additions and 5855 deletions

View File

@@ -507,7 +507,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: {
assert(SpvOpSpecConstantOp == opcode);
if (grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
if (word > static_cast<uint32_t>(SpvOp::SpvOpMax) ||
grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
return diagnostic()
<< "Invalid " << spvOperandTypeStr(type) << ": " << word;
}