Commit Graph

5 Commits

Author SHA1 Message Date
Ivan Avdeev 1d90bb1835 imagelib: format new ktx2 code to codestyle 2023-10-16 12:30:12 -04:00
Ivan 'provod' Avdeev 2e2e17b008 imagelib: vk: add support for BC4
Tested with KTX2 and ref_vk
Added to DDS too.
Not added to any other renderers.
2023-10-13 21:47:22 -04:00
Ivan Avdeev 91e20382ad imagelib: expand KTX2 support to other renderers
Only for BC5 and BC6H formats for now.

However, adding new formats is easy:
1. Copy format's definition from `VkFormat` to `ktx2.h`
2. Map it to `PF_` format in `Image_KTX2Format()`
3. Done
4. Really, that should be it.
5. I mean, most formats would require PF_ enum extension, but we're not
   going to support all of them right?
2023-10-13 10:32:50 -04:00
Ivan Avdeev 4158234fb2 rename ktx_ to ktx2_ for consistency 2023-10-12 12:51:58 -04:00
Ivan Avdeev 90119ae84a imagelib: add rudimentary KTX2 support
It only does a very basic header validation, and passes the entire file
as PF_KTX2_RAW format. This is to simplify KTX2 reading in ref_vk and
trying out different formats. KTX2 has support for >200 format, and
passing all of them through PF_ types is a non-starter.

The plan is to figure out which formats we want to support, and add
their support to imagelib/ktx2 incrementally, leaving the rest as
PF_KTX2_RAW, so ref_vk still can use them.
2023-10-12 12:38:35 -04:00