diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2017-08-01 12:39:20 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-01 12:39:19 +1000 |
| commit | fe65b26d53606fb9edf7e0db0e5b2c52f1ea3978 (patch) | |
| tree | 3183a95deab2f3f5a2a61de84fd03680fc28204d /Source/Core/VideoBackends/Vulkan/Util.cpp | |
| parent | b93d118cef8dd8dd85bf662f5ad4abb083610d3e (diff) | |
| parent | 63305e917328d0ce9f3db6def51eaa67f23880ec (diff) | |
Merge pull request #5834 from stenzek/bc7
Support loading BC7 (BPTC) textures from DDS files
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/Util.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Util.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Util.cpp b/Source/Core/VideoBackends/Vulkan/Util.cpp index fc5b2ec8dc..e377bb32cf 100644 --- a/Source/Core/VideoBackends/Vulkan/Util.cpp +++ b/Source/Core/VideoBackends/Vulkan/Util.cpp @@ -61,6 +61,7 @@ bool IsCompressedFormat(VkFormat format) case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: case VK_FORMAT_BC2_UNORM_BLOCK: case VK_FORMAT_BC3_UNORM_BLOCK: + case VK_FORMAT_BC7_UNORM_BLOCK: return true; default: @@ -102,6 +103,9 @@ VkFormat GetVkFormatForHostTextureFormat(AbstractTextureFormat format) case AbstractTextureFormat::DXT5: return VK_FORMAT_BC3_UNORM_BLOCK; + case AbstractTextureFormat::BPTC: + return VK_FORMAT_BC7_UNORM_BLOCK; + case AbstractTextureFormat::RGBA8: default: return VK_FORMAT_R8G8B8A8_UNORM; @@ -130,6 +134,7 @@ u32 GetTexelSize(VkFormat format) case VK_FORMAT_BC2_UNORM_BLOCK: case VK_FORMAT_BC3_UNORM_BLOCK: + case VK_FORMAT_BC7_UNORM_BLOCK: return 16; default: @@ -145,6 +150,7 @@ u32 GetBlockSize(VkFormat format) case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: case VK_FORMAT_BC2_UNORM_BLOCK: case VK_FORMAT_BC3_UNORM_BLOCK: + case VK_FORMAT_BC7_UNORM_BLOCK: return 4; default: |
