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

Method Process

source/opt/replace_desc_array_access_using_var_index.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38} // namespace
39
40Pass::Status ReplaceDescArrayAccessUsingVarIndex::Process() {
41 Status status = Status::SuccessWithoutChange;
42 for (Instruction& var : context()->types_values()) {
43 if (descsroautil::IsDescriptorArray(context(), &var)) {
44 Status s = ReplaceVariableAccessesWithConstantElements(&var);
45 if (s == Status::Failure) return Status::Failure;
46 if (s == Status::SuccessWithChange) status = Status::SuccessWithChange;
47 }
48 }
49 return status;
50}
51
52Pass::Status ReplaceDescArrayAccessUsingVarIndex::
53 ReplaceVariableAccessesWithConstantElements(Instruction* var) const {

Callers

nothing calls this directly

Calls 2

IsDescriptorArrayFunction · 0.85
types_valuesMethod · 0.45

Tested by

no test coverage detected