mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-10 23:27:53 +00:00
a251600c8a
* engine: common: imagelib: add KTX2 support Adds basic KTX2 support for a few compressed formats. KTX2 essentially is a Vulkan-centric texture format that supports literally hundreds of pixel formats. For now only support for these is added: - `VK_FORMAT_BC4_UNORM_BLOCK` - `VK_FORMAT_BC4_SNORM_BLOCK` - `VK_FORMAT_BC5_UNORM_BLOCK` - `VK_FORMAT_BC5_SNORM_BLOCK` - `VK_FORMAT_BC6H_UFLOAT_BLOCK` - `VK_FORMAT_BC6H_SFLOAT_BLOCK` - `VK_FORMAT_BC7_UNORM_BLOCK` - `VK_FORMAT_BC7_SRGB_BLOCK` Adding more formats is relatively straightforward: - Copy format definition from `VkFormat` enum in `vulkan_core.h` - Add a new definition into `pixformat_t` enum. - Add format size calculation into `Image_ComputeSize()` While we're at it, also adds a few new formats to DDS: - BC4_UNORM -- PF_BC4_UNSIGNED - BC4_SNORM -- PF_BC4_SIGNED - BC5_UNORM -- PF_BC5_UNSIGNED - BC5_SNORM -- PF_BC5_SIGNED - BC7 is expanded into BC7_UNORM and BC7_SRGB ref_gl and ref_soft code is updated where it made sense. But not tested really. Support for these formats has been tested with ref_vk. * address spaces-vs-parentheses formatting where noticed * parenthesize sizeofs * move ktx2.h to imagelib as img_ktx2.h; massage it a bit * use SetBits() instead of |= * remove stale TODO comments |
||
---|---|---|
.. | ||
adivtab.h | ||
r_aclip.c | ||
r_beams.c | ||
r_bsp.c | ||
r_context.c | ||
r_decals.c | ||
r_draw.c | ||
r_edge.c | ||
r_glblit.c | ||
r_image.c | ||
r_light.c | ||
r_local.h | ||
r_main.c | ||
r_math.c | ||
r_misc.c | ||
r_part.c | ||
r_polyse.c | ||
r_rast.c | ||
r_scan.c | ||
r_sprite.c | ||
r_studio.c | ||
r_surf.c | ||
r_trialias.c | ||
r_triapi.c | ||
r_vgui.c | ||
wscript |