mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-10 15:17:52 +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 |
||
---|---|---|
.. | ||
backends.h | ||
beamdef.h | ||
boneinfo.h | ||
bspfile.h | ||
cl_entity.h | ||
com_image.h | ||
com_model.h | ||
con_nprint.h | ||
const.h | ||
cvardef.h | ||
defaults.h | ||
demo_api.h | ||
dlight.h | ||
enginefeatures.h | ||
entity_state.h | ||
entity_types.h | ||
event_api.h | ||
event_args.h | ||
event_flags.h | ||
gameinfo.h | ||
hltv.h | ||
ivoicetweak.h | ||
kbutton.h | ||
lightstyle.h | ||
mathlib.h | ||
net_api.h | ||
netadr.h | ||
particledef.h | ||
pmtrace.h | ||
port.h | ||
qfont.h | ||
r_efx.h | ||
r_studioint.h | ||
ref_params.h | ||
render_api.h | ||
screenfade.h | ||
studio_event.h | ||
synctype.h | ||
triangleapi.h | ||
usercmd.h | ||
wadfile.h | ||
weaponinfo.h | ||
wrect.h | ||
xash3d_types.h |