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

Method HasExtraArrayness

source/opt/interface_var_sroa.cpp:137–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135} // namespace
136
137bool InterfaceVariableScalarReplacement::HasExtraArrayness(
138 Instruction& entry_point, Instruction* var) {
139 spv::ExecutionModel execution_model =
140 static_cast<spv::ExecutionModel>(entry_point.GetSingleWordInOperand(0));
141 if (execution_model != spv::ExecutionModel::TessellationEvaluation &&
142 execution_model != spv::ExecutionModel::TessellationControl) {
143 return false;
144 }
145 if (!context()->get_decoration_mgr()->HasDecoration(
146 var->result_id(), uint32_t(spv::Decoration::Patch))) {
147 if (execution_model == spv::ExecutionModel::TessellationControl)
148 return true;
149 return GetStorageClass(var) != spv::StorageClass::Output;
150 }
151 return false;
152}
153
154bool InterfaceVariableScalarReplacement::
155 CheckExtraArraynessConflictBetweenEntries(Instruction* interface_var,

Callers

nothing calls this directly

Calls 5

GetStorageClassFunction · 0.70
HasDecorationMethod · 0.45
get_decoration_mgrMethod · 0.45
result_idMethod · 0.45

Tested by

no test coverage detected