MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / validate_decompression_swizzle

Function validate_decompression_swizzle

Source/astcenc_entry.cpp:406–418  ·  view source on GitHub ↗

* @brief Validate overall decompression swizzle. * * @param swizzle The swizzle to check. * * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure. */

Source from the content-addressed store, hash-verified

404 * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure.
405 */
406static astcenc_error validate_decompression_swizzle(
407 const astcenc_swizzle& swizzle
408) {
409 if (validate_decompression_swz(swizzle.r) ||
410 validate_decompression_swz(swizzle.g) ||
411 validate_decompression_swz(swizzle.b) ||
412 validate_decompression_swz(swizzle.a))
413 {
414 return ASTCENC_ERR_BAD_SWIZZLE;
415 }
416
417 return ASTCENC_SUCCESS;
418}
419
420/**
421 * Validate that an incoming configuration is in-spec.

Callers 1

astcenc_decompress_imageFunction · 0.85

Calls 1

Tested by

no test coverage detected