diff options
author | quou <quou@disroot.org> | 2025-01-01 15:26:48 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-01 15:37:09 +1100 |
commit | 568ba73c71b650f905bd1b3f60f10871316eefdc (patch) | |
tree | a7c604c2a24b0dfd694096bd9dd9f0fdeb1d7ad1 /video.cpp | |
parent | 221d157d069ab248c9f11653fa37a670d5a7a212 (diff) |
BC4 and BC5 compression
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -283,6 +283,8 @@ static VkFormat get_vk_format(Texture_Format fmt) { case texture_format_rgba16f: return VK_FORMAT_R16G16B16A16_SFLOAT; case texture_format_rgba32f: return VK_FORMAT_R32G32B32A32_SFLOAT; case texture_format_bc1: return VK_FORMAT_BC1_RGB_UNORM_BLOCK; + case texture_format_bc4: return VK_FORMAT_BC4_UNORM_BLOCK; + case texture_format_bc5: return VK_FORMAT_BC5_UNORM_BLOCK; case texture_format_d16: return VK_FORMAT_D16_UNORM; case texture_format_d24s8: return VK_FORMAT_D24_UNORM_S8_UINT; case texture_format_d32: return VK_FORMAT_D32_SFLOAT; @@ -3633,7 +3635,10 @@ size_t Texture_Loader::calc_size( ) { switch (fmt) { case texture_format_bc1: + case texture_format_bc4: return (w / 4) * (h / 4) * 8; + case texture_format_bc5: + return (w / 4) * (h / 4) * 16; case texture_format_r8i: return w * h; default: |