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

Function ValidateImageDataSize

deps/LLGL/sources/Core/Image.cpp:298–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298static void ValidateImageDataSize(const Extent3D& extent, const DstImageDescriptor& imageDesc)
299{
300 const auto requiredDataSize = GetRequiredImageDataSize(extent, imageDesc.format, imageDesc.dataType);
301 if (imageDesc.dataSize < requiredDataSize)
302 {
303 throw std::invalid_argument(
304 "data size of destinaton image descriptor is too small (" + std::to_string(requiredDataSize) +
305 " is required, but only " + std::to_string(imageDesc.dataSize) + " was specified)"
306 );
307 }
308}
309
310static void ValidateImageDataSize(const Extent3D& extent, const SrcImageDescriptor& imageDesc)
311{

Callers 4

WriteTextureMethod · 0.85
ReadTextureMethod · 0.85
ReadPixelsMethod · 0.85
WritePixelsMethod · 0.85

Calls 2

GetRequiredImageDataSizeFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected