KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.75k stars 462 forks source link

Clarify ASTC support #926

Open lexaknyazev opened 5 years ago

lexaknyazev commented 5 years ago

With OpenGL, ASTC support was split into several extensions that stack functionality like this:

LDR,
2D (Array),
Cube (Array)
3D Slices HDR 3D Blocks
KHR_texture_compression_astc_ldr ✔️
KHR_texture_compression_astc_sliced_3d ✔️ ✔️
KHR_texture_compression_astc_hdr ✔️ ✔️ ✔️
OES_texture_compression_astc ✔️ ✔️ ✔️ ✔️

In Vulkan, VkPhysicalDeviceFeatures.textureCompressionASTC_LDR and _UNORM_ in formats' names hint that only LDR blocks are supported.

janharaldfredriksen-arm commented 5 years ago

Hi,

Does it imply that 3D slices are supported as well?

Good question. My reading is that it can be supported, but is not required (since ASTC format requirements are only spelled out for 2D images).

VK_EXT_astc_decode_mode defines decoding process for HDR blocks. Was it done just for future-proofing the extension (and for better alignment with OpenGL's EXT_texture_compression_astc_decode_mode) since there are no VkFormat enums for ASTC HDR?

Yes.

lexaknyazev commented 5 years ago

My reading is that it can be supported, but is not required...

OK. Is it safe to assume that existing LDR VkFormat enums can be used with 3D targets (when supported)?

janharaldfredriksen-arm commented 5 years ago

Maybe.. It looks it like works on our (Arm's) implementation. But AFAICT there's no conformance test coverage for this, so I can't speak for anyone else. (I'll see if we can get the CTS coverage.)

lexaknyazev commented 5 years ago

@janharaldfredriksen-arm Were you able to get the CTS coverage?

alecazam commented 1 year ago

Don't forget this extension which is required for Mali/Qualcomm to treat ASTC in a sane way in the texture cache. Really unfortunate that this isn't the default.

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_astc_decode_mode.html