mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-11-17 13:26:12 +00:00
Updated spirv-tools.
This commit is contained in:
+5
-5
@@ -147,7 +147,7 @@ bool DoesDebugInfoOperandMatchExpectation(
|
||||
const Instruction* inst, uint32_t word_index) {
|
||||
if (inst->words().size() <= word_index) return false;
|
||||
auto* debug_inst = _.FindDef(inst->word(word_index));
|
||||
if (debug_inst->opcode() != spv::Op::OpExtInst ||
|
||||
if (!spvIsExtendedInstruction(debug_inst->opcode()) ||
|
||||
(debug_inst->ext_inst_type() != SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 &&
|
||||
debug_inst->ext_inst_type() !=
|
||||
SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) ||
|
||||
@@ -165,7 +165,7 @@ bool DoesDebugInfoOperandMatchExpectation(
|
||||
const Instruction* inst, uint32_t word_index) {
|
||||
if (inst->words().size() <= word_index) return false;
|
||||
auto* debug_inst = _.FindDef(inst->word(word_index));
|
||||
if (debug_inst->opcode() != spv::Op::OpExtInst ||
|
||||
if (!spvIsExtendedInstruction(debug_inst->opcode()) ||
|
||||
(debug_inst->ext_inst_type() !=
|
||||
SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) ||
|
||||
!expectation(
|
||||
@@ -409,7 +409,7 @@ spv_result_t ValidateClspvReflectionArgumentInfo(ValidationState_t& _,
|
||||
spv_result_t ValidateKernelDecl(ValidationState_t& _, const Instruction* inst) {
|
||||
const auto decl_id = inst->GetOperandAs<uint32_t>(4);
|
||||
const auto decl = _.FindDef(decl_id);
|
||||
if (!decl || decl->opcode() != spv::Op::OpExtInst) {
|
||||
if (!decl || !spvIsExtendedInstruction(decl->opcode())) {
|
||||
return _.diag(SPV_ERROR_INVALID_ID, inst)
|
||||
<< "Kernel must be a Kernel extended instruction";
|
||||
}
|
||||
@@ -432,7 +432,7 @@ spv_result_t ValidateKernelDecl(ValidationState_t& _, const Instruction* inst) {
|
||||
spv_result_t ValidateArgInfo(ValidationState_t& _, const Instruction* inst,
|
||||
uint32_t info_index) {
|
||||
auto info = _.FindDef(inst->GetOperandAs<uint32_t>(info_index));
|
||||
if (!info || info->opcode() != spv::Op::OpExtInst) {
|
||||
if (!info || !spvIsExtendedInstruction(info->opcode())) {
|
||||
return _.diag(SPV_ERROR_INVALID_ID, inst)
|
||||
<< "ArgInfo must be an ArgumentInfo extended instruction";
|
||||
}
|
||||
@@ -3706,7 +3706,7 @@ spv_result_t ExtensionPass(ValidationState_t& _, const Instruction* inst) {
|
||||
const spv::Op opcode = inst->opcode();
|
||||
if (opcode == spv::Op::OpExtension) return ValidateExtension(_, inst);
|
||||
if (opcode == spv::Op::OpExtInstImport) return ValidateExtInstImport(_, inst);
|
||||
if (opcode == spv::Op::OpExtInst) return ValidateExtInst(_, inst);
|
||||
if (spvIsExtendedInstruction(opcode)) return ValidateExtInst(_, inst);
|
||||
|
||||
return SPV_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user