summaryrefslogtreecommitdiffstats
path: root/src/video_core/surface.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-06-28 18:53:17 +0200
committerGitHub <noreply@github.com>2023-06-28 18:53:17 +0200
commitb60b70e86d7c32b06a7580ddc286279a83587e11 (patch)
treeea6092ba2bda4b2f685926ba133faedd5c65fa57 /src/video_core/surface.cpp
parentMerge pull request #10933 from merryhime/dunno (diff)
parentrenderer_vulkan: Prevent crashes when blitting depth stencil (diff)
downloadyuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar.gz
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar.bz2
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar.lz
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar.xz
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.tar.zst
yuzu-b60b70e86d7c32b06a7580ddc286279a83587e11.zip
Diffstat (limited to '')
-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: