|
@@ -951,4 +951,29 @@ namespace AZ::ShaderCompiler
|
|
|
return memberList[memberList.size() - 1];
|
|
|
}
|
|
|
|
|
|
+ void IntermediateRepresentation::AnalyzeOptionRanks()
|
|
|
+ {
|
|
|
+ // loop over variables
|
|
|
+ for (auto& [uid, varInfo, kindInfo] : m_symbols.GetOrderedSymbolsOfSubType_3<VarInfo>())
|
|
|
+ {
|
|
|
+ // only options
|
|
|
+ if (varInfo->CheckHasStorageFlag(StorageFlag::Option))
|
|
|
+ {
|
|
|
+ int impactScore = 0;
|
|
|
+ // loop over appearances over the program
|
|
|
+ for (Seenat& ref : kindInfo->GetSeenats())
|
|
|
+ {
|
|
|
+ // determine an impact score
|
|
|
+ impactScore += AnalyzeImpact(ref.m_where);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ int IntermediateRepresentation::AnalyzeImpact(TokensLocation const& location)
|
|
|
+ {
|
|
|
+ // find the node at location:
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
} // end of namespace AZ::ShaderCompiler
|