* @memberof ktxTexture * @internal * @ingroup reader writer * @~English * @brief Creates valid ASTC decoder profile from VkFormat * * @return Valid astc_profile from VkFormat */
| 194 | * @return Valid astc_profile from VkFormat |
| 195 | */ |
| 196 | static astcenc_profile |
| 197 | astcProfile(bool sRGB, bool ldr) { |
| 198 | |
| 199 | if (sRGB && ldr) |
| 200 | return ASTCENC_PRF_LDR_SRGB; |
| 201 | else if (!sRGB) { |
| 202 | if (ldr) |
| 203 | return ASTCENC_PRF_LDR; |
| 204 | else |
| 205 | return ASTCENC_PRF_HDR; |
| 206 | } |
| 207 | // TODO: Add support for the following |
| 208 | // KTX_PACK_ASTC_ENCODER_ACTION_COMP_HDR_RGB_LDR_ALPHA; currently not supported |
| 209 | |
| 210 | assert(ldr && "HDR sRGB profile not supported"); |
| 211 | |
| 212 | return ASTCENC_PRF_LDR_SRGB; |
| 213 | } |
| 214 | |
| 215 | //************************************************************************ |
| 216 | //* Decoder functions * |
no test coverage detected