| 36 | namespace sg |
| 37 | { |
| 38 | bool is_astc(const VkFormat format) |
| 39 | { |
| 40 | return (format == VK_FORMAT_ASTC_4x4_UNORM_BLOCK || |
| 41 | format == VK_FORMAT_ASTC_4x4_SRGB_BLOCK || |
| 42 | format == VK_FORMAT_ASTC_5x4_UNORM_BLOCK || |
| 43 | format == VK_FORMAT_ASTC_5x4_SRGB_BLOCK || |
| 44 | format == VK_FORMAT_ASTC_5x5_UNORM_BLOCK || |
| 45 | format == VK_FORMAT_ASTC_5x5_SRGB_BLOCK || |
| 46 | format == VK_FORMAT_ASTC_6x5_UNORM_BLOCK || |
| 47 | format == VK_FORMAT_ASTC_6x5_SRGB_BLOCK || |
| 48 | format == VK_FORMAT_ASTC_6x6_UNORM_BLOCK || |
| 49 | format == VK_FORMAT_ASTC_6x6_SRGB_BLOCK || |
| 50 | format == VK_FORMAT_ASTC_8x5_UNORM_BLOCK || |
| 51 | format == VK_FORMAT_ASTC_8x5_SRGB_BLOCK || |
| 52 | format == VK_FORMAT_ASTC_8x6_UNORM_BLOCK || |
| 53 | format == VK_FORMAT_ASTC_8x6_SRGB_BLOCK || |
| 54 | format == VK_FORMAT_ASTC_8x8_UNORM_BLOCK || |
| 55 | format == VK_FORMAT_ASTC_8x8_SRGB_BLOCK || |
| 56 | format == VK_FORMAT_ASTC_10x5_UNORM_BLOCK || |
| 57 | format == VK_FORMAT_ASTC_10x5_SRGB_BLOCK || |
| 58 | format == VK_FORMAT_ASTC_10x6_UNORM_BLOCK || |
| 59 | format == VK_FORMAT_ASTC_10x6_SRGB_BLOCK || |
| 60 | format == VK_FORMAT_ASTC_10x8_UNORM_BLOCK || |
| 61 | format == VK_FORMAT_ASTC_10x8_SRGB_BLOCK || |
| 62 | format == VK_FORMAT_ASTC_10x10_UNORM_BLOCK || |
| 63 | format == VK_FORMAT_ASTC_10x10_SRGB_BLOCK || |
| 64 | format == VK_FORMAT_ASTC_12x10_UNORM_BLOCK || |
| 65 | format == VK_FORMAT_ASTC_12x10_SRGB_BLOCK || |
| 66 | format == VK_FORMAT_ASTC_12x12_UNORM_BLOCK || |
| 67 | format == VK_FORMAT_ASTC_12x12_SRGB_BLOCK); |
| 68 | } |
| 69 | |
| 70 | // When the color-space of a loaded image is unknown (from KTX1 for example) we |
| 71 | // may want to assume that the loaded data is in sRGB format (since it usually is). |