MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / getStats

Method getStats

Source/Falcor/Scene/Material/MaterialSystem.cpp:650–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648 }
649
650 MaterialSystem::MaterialStats MaterialSystem::getStats() const
651 {
652 FALCOR_CHECK(!mMaterialsChanged, "Materials have changed. Call update() first.");
653
654 MaterialStats s = {};
655
656 s.materialTypeCount = mMaterialTypes.size();
657 s.materialCount = mMaterials.size();
658 s.materialOpaqueCount = 0;
659 s.materialMemoryInBytes += mpMaterialDataBuffer ? mpMaterialDataBuffer->getSize() : 0;
660
661 for (const auto& pMaterial : mMaterials)
662 {
663 if (pMaterial->isOpaque()) s.materialOpaqueCount++;
664 }
665
666 const auto textureStats = mpTextureManager->getStats();
667 s.textureCount = textureStats.textureCount;
668 s.textureCompressedCount = textureStats.textureCompressedCount;
669 s.textureTexelCount = textureStats.textureTexelCount;
670 s.textureTexelChannelCount = textureStats.textureTexelChannelCount;
671 s.textureMemoryInBytes = textureStats.textureMemoryInBytes;
672
673 return s;
674 }
675
676 void MaterialSystem::loadLightProfile(const std::filesystem::path& absoluteFilename, bool normalize)
677 {

Callers 2

updateMaterialStatsMethod · 0.45
renderUIMethod · 0.45

Calls 2

sizeMethod · 0.45
getSizeMethod · 0.45

Tested by

no test coverage detected