mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Updated spirv-tools.
This commit is contained in:
14
3rdparty/spirv-tools/source/val/validate.cpp
vendored
14
3rdparty/spirv-tools/source/val/validate.cpp
vendored
@@ -385,7 +385,6 @@ spv_result_t ValidateBinaryUsingContextAndValidationState(
|
||||
Instruction* inst = const_cast<Instruction*>(&instruction);
|
||||
vstate->RegisterInstruction(inst);
|
||||
}
|
||||
if (auto error = UpdateIdUse(*vstate, &instruction)) return error;
|
||||
}
|
||||
|
||||
if (!vstate->has_memory_model_specified())
|
||||
@@ -399,6 +398,19 @@ spv_result_t ValidateBinaryUsingContextAndValidationState(
|
||||
// Catch undefined forward references before performing further checks.
|
||||
if (auto error = ValidateForwardDecls(*vstate)) return error;
|
||||
|
||||
// ID usage needs be handled in its own iteration of the instructions,
|
||||
// between the two others. It depends on the first loop to have been
|
||||
// finished, so that all instructions have been registered. And the following
|
||||
// loop depends on all of the usage data being populated. Thus it cannot live
|
||||
// in either of those iterations.
|
||||
// It should also live after the forward declaration check, since it will
|
||||
// have problems with missing forward declarations, but give less useful error
|
||||
// messages.
|
||||
for (size_t i = 0; i < vstate->ordered_instructions().size(); ++i) {
|
||||
auto& instruction = vstate->ordered_instructions()[i];
|
||||
if (auto error = UpdateIdUse(*vstate, &instruction)) return error;
|
||||
}
|
||||
|
||||
// Validate individual opcodes.
|
||||
for (size_t i = 0; i < vstate->ordered_instructions().size(); ++i) {
|
||||
auto& instruction = vstate->ordered_instructions()[i];
|
||||
|
||||
Reference in New Issue
Block a user