MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / IsValidScope

Function IsValidScope

source/val/validate_scopes.cpp:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace val {
23
24bool IsValidScope(uint32_t scope) {
25 // Deliberately avoid a default case so we have to update the list when the
26 // scopes list changes.
27 switch (static_cast<spv::Scope>(scope)) {
28 case spv::Scope::CrossDevice:
29 case spv::Scope::Device:
30 case spv::Scope::Workgroup:
31 case spv::Scope::Subgroup:
32 case spv::Scope::Invocation:
33 case spv::Scope::QueueFamilyKHR:
34 case spv::Scope::ShaderCallKHR:
35 return true;
36 case spv::Scope::Max:
37 break;
38 }
39 return false;
40}
41
42spv_result_t ValidateScope(ValidationState_t& _, const Instruction* inst,
43 uint32_t scope) {

Callers 1

ValidateScopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected