* @brief Validate overall decompression swizzle. * * @param swizzle The swizzle to check. * * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure. */
| 404 | * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure. |
| 405 | */ |
| 406 | static 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. |
no test coverage detected