* @memberof ktxTexture * @internal * @ingroup reader * @~English * @brief Should be used to get uncompressed version of ASTC VkFormat * * The decompressed format is calculated from corresponding ASTC format. There are * only 3 possible options currently supported. RGBA8, SRGBA8 and RGBA32. * * @return Uncompressed version of VKFormat for a specific ASTC VkFormat */
| 242 | * @return Uncompressed version of VKFormat for a specific ASTC VkFormat |
| 243 | */ |
| 244 | inline VkFormat getUncompressedFormat(ktxTexture2* This) noexcept { |
| 245 | uint32_t* BDB = This->pDfd + 1; |
| 246 | |
| 247 | if (KHR_DFDSVAL(BDB, 0, QUALIFIERS) & KHR_DF_SAMPLE_DATATYPE_FLOAT) { |
| 248 | return VK_FORMAT_R32G32B32A32_SFLOAT; |
| 249 | } else { |
| 250 | if (khr_df_transfer_e(KHR_DFDVAL(BDB, TRANSFER) == KHR_DF_TRANSFER_SRGB)) |
| 251 | return VK_FORMAT_R8G8B8A8_SRGB; |
| 252 | else |
| 253 | return VK_FORMAT_R8G8B8A8_UNORM; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | struct decompression_workload |
| 258 | { |
no outgoing calls
no test coverage detected