MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / GetMemoryFootprint

Function GetMemoryFootprint

deps/LLGL/sources/Renderer/Format.cpp:186–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186std::uint32_t GetMemoryFootprint(const Format format, std::uint32_t numTexels)
187{
188 const auto& formatDesc = GetFormatAttribs(format);
189 const auto blockSize = formatDesc.blockWidth * formatDesc.blockHeight;
190 if (blockSize > 0 && numTexels % blockSize == 0)
191 return ((numTexels / blockSize * formatDesc.bitSize) / 8);
192 else
193 return 0;
194}
195
196LLGL_EXPORT std::uint32_t ImageFormatSize(const ImageFormat imageFormat)
197{

Callers 13

GetMemoryFootprintMethod · 0.70
ValidateImageDataSizeMethod · 0.50
CreateTextureMethod · 0.50
WriteTextureMethod · 0.50
ReadTextureMethod · 0.50
CopyBufferFromTextureMethod · 0.50
CopyTextureFromBufferMethod · 0.50
ValidateSourceImageDescFunction · 0.50
CopyImageBufferRegionFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected