Added size_t DXIL::Program:::GetInstructionCount() const;

This commit is contained in:
Jake Turner committed 2024-06-03 12:24:32 +01:00
1 parent 8c23b861d8
commit a6b018b44b
2 files changed
+11

No files matched your search

@@ -1511,6 +1511,7 @@ public:
rdcstr GetDebugStatus();
rdcarray<ShaderEntryPoint> GetEntryPoints();
void FillEntryPointInterfaces();
size_t GetInstructionCount() const;
rdcstr GetResourceReferenceName(ResourceClass resClass, const BindingSlot &slot) const;
// false means stop processing
void ProcessFunctions(std::function<bool(const Function *)> callback) const;
@@ -1794,4 +1794,14 @@ void Program::ProcessFunctions(std::function<bool(const Function *)> callback) c
break;
}
}
size_t Program::GetInstructionCount() const
{
size_t ret = 0;
for(size_t i = 0; i < m_Functions.size(); i++)
ret += m_Functions[i]->instructions.size();
return ret;
}
}; // namespace DXIL