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

Method getTextureSizeInBytes

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

Source from the content-addressed store, hash-verified

738}
739
740uint64_t Texture::getTextureSizeInBytes() const
741{
742 // get allocation info for resource description
743 size_t outSizeBytes = 0, outAlignment = 0;
744
745 gfx::ITextureResource::Desc* desc = mGfxTextureResource->getDesc();
746
747 FALCOR_GFX_CALL(mpDevice->getGfxDevice()->getTextureAllocationInfo(*desc, &outSizeBytes, &outAlignment));
748 FALCOR_ASSERT(outSizeBytes > 0);
749
750 return outSizeBytes;
751}
752
753/**
754 * Python binding wrapper for returning the content of a texture as a numpy array.

Callers 6

getStatsMethod · 0.80
getSizeMethod · 0.80
getSizeMethod · 0.80
getMemoryUsageInBytesMethod · 0.80
getGridSizeInBytesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected