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

Method getTexelCount

Source/Falcor/Core/API/Texture.cpp:719–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719uint64_t Texture::getTexelCount() const
720{
721 uint64_t count = 0;
722 for (uint32_t i = 0; i < getMipCount(); i++)
723 {
724 uint64_t texelsInMip = (uint64_t)getWidth(i) * getHeight(i) * getDepth(i);
725 FALCOR_ASSERT(texelsInMip > 0);
726 count += texelsInMip;
727 }
728 count *= getArraySize();
729 FALCOR_ASSERT(count > 0);
730 return count;
731}
732
733bool Texture::compareDesc(const Texture* pOther) const
734{

Callers 1

getStatsMethod · 0.80

Calls 5

getMipCountFunction · 0.70
getWidthFunction · 0.70
getHeightFunction · 0.70
getDepthFunction · 0.70
getArraySizeFunction · 0.70

Tested by

no test coverage detected