summaryrefslogtreecommitdiffstats
path: root/src/video_core/surface.cpp
diff options
context:
space:
mode:
authorGPUCode <geoster3d@gmail.com>2023-06-06 22:10:06 +0200
committerbunnei <bunneidev@gmail.com>2023-06-28 03:00:09 +0200
commiteac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe (patch)
tree761e98947d8e26a6409e24befa99cd127f67458d /src/video_core/surface.cpp
parentrenderer_vulkan: Add more feature checking (diff)
downloadyuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.gz
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.bz2
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.lz
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.xz
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.tar.zst
yuzu-eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe.zip
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r--src/video_core/surface.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index cb51529e4..e16cd5e73 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -269,6 +269,28 @@ bool IsPixelFormatASTC(PixelFormat format) {
}
}
+bool IsPixelFormatBCn(PixelFormat format) {
+ switch (format) {
+ case PixelFormat::BC1_RGBA_UNORM:
+ case PixelFormat::BC2_UNORM:
+ case PixelFormat::BC3_UNORM:
+ case PixelFormat::BC4_UNORM:
+ case PixelFormat::BC4_SNORM:
+ case PixelFormat::BC5_UNORM:
+ case PixelFormat::BC5_SNORM:
+ case PixelFormat::BC1_RGBA_SRGB:
+ case PixelFormat::BC2_SRGB:
+ case PixelFormat::BC3_SRGB:
+ case PixelFormat::BC7_UNORM:
+ case PixelFormat::BC6H_UFLOAT:
+ case PixelFormat::BC6H_SFLOAT:
+ case PixelFormat::BC7_SRGB:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool IsPixelFormatSRGB(PixelFormat format) {
switch (format) {
case PixelFormat::A8B8G8R8_SRGB: