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

Function IsInterfaceVariable

source/val/validate_mesh_shading.cpp:26–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace val {
25
26bool IsInterfaceVariable(ValidationState_t& _, const Instruction* inst,
27 spv::ExecutionModel model) {
28 bool foundInterface = false;
29 for (auto entry_point : _.entry_points()) {
30 const auto* models = _.GetExecutionModels(entry_point);
31 if (models->find(model) == models->end()) return false;
32 for (const auto& desc : _.entry_point_descriptions(entry_point)) {
33 for (auto interface : desc.interfaces) {
34 if (inst->id() == interface) {
35 foundInterface = true;
36 break;
37 }
38 }
39 }
40 }
41 return foundInterface;
42}
43
44spv_result_t ValidateEmitMeshTasks(ValidationState_t& _,
45 const Instruction* inst) {

Callers 1

ValidateMeshVariableFunction · 0.85

Calls 4

entry_pointsMethod · 0.80
GetExecutionModelsMethod · 0.80
endMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected