| 296 | } |
| 297 | |
| 298 | static 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 | |
| 310 | static void ValidateImageDataSize(const Extent3D& extent, const SrcImageDescriptor& imageDesc) |
| 311 | { |
no test coverage detected