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 26362 additions and 5854 deletions
@@ -225,14 +225,21 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) {
}
}
}
if (i.opcode() == SpvOpExecutionModeId) {
const auto mode = i.GetOperandAs<SpvExecutionMode>(1);
if (mode == SpvExecutionModeLocalSizeId) {
ok = true;
break;
}
}
}
if (!ok) {
return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< _.VkErrorID(4683)
<< _.VkErrorID(6426)
<< "In the Vulkan environment, GLCompute execution model "
"entry points require either the LocalSize execution "
"mode or an object decorated with WorkgroupSize must be "
"specified.";
"entry points require either the LocalSize or "
"LocalSizeId execution mode or an object decorated with "
"WorkgroupSize must be specified.";
}
}
break;
@@ -429,6 +436,10 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _,
break;
case SpvExecutionModeLocalSize:
case SpvExecutionModeLocalSizeId:
if (mode == SpvExecutionModeLocalSizeId && !_.IsLocalSizeIdAllowed())
return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< "LocalSizeId mode is not allowed by the current environment.";
if (!std::all_of(models->begin(), models->end(),
[&_](const SpvExecutionModel& model) {
switch (model) {