summaryrefslogtreecommitdiffstats
path: root/src/video_core/surface.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-07-01 06:18:43 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-07-13 06:01:09 +0200
commiteda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042 (patch)
tree896889ac053cac733567007f74de34169540e2a0 /src/video_core/surface.h
parentvideo_core/format_lookup_table: Add formats with existing PixelFormat (diff)
downloadyuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar.gz
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar.bz2
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar.lz
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar.xz
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.tar.zst
yuzu-eda37ff26b5c0a8b9f4e6237dbf8ace8ef82e042.zip
Diffstat (limited to 'src/video_core/surface.h')
-rw-r--r--src/video_core/surface.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index 9510db2c8..826c5a3ad 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -20,6 +20,7 @@ enum class PixelFormat {
ABGR8I,
ABGR8UI,
B5G6R5U,
+ R5G6B5U,
B5G5R5A1U,
A2B10G10R10U,
A2B10G10R10UI,
@@ -38,7 +39,8 @@ enum class PixelFormat {
DXT1,
DXT23,
DXT45,
- DXN1, // This is also known as BC4
+ DXN1UNORM, // This is also known as BC4
+ DXN1SNORM,
DXN2UNORM,
DXN2SNORM,
BC7U,
@@ -144,6 +146,7 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{
0, // ABGR8I
0, // ABGR8UI
0, // B5G6R5U
+ 0, // R5G6B5U
0, // B5G5R5A1U
0, // A2B10G10R10U
0, // A2B10G10R10UI
@@ -162,7 +165,8 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{
2, // DXT1
2, // DXT23
2, // DXT45
- 2, // DXN1
+ 2, // DXN1UNORM
+ 2, // DXN1SNORM
2, // DXN2UNORM
2, // DXN2SNORM
2, // BC7U
@@ -252,6 +256,7 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{
1, // ABGR8I
1, // ABGR8UI
1, // B5G6R5U
+ 1, // R5G6B5U
1, // B5G5R5A1U
1, // A2B10G10R10U
1, // A2B10G10R10UI
@@ -270,7 +275,8 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{
4, // DXT1
4, // DXT23
4, // DXT45
- 4, // DXN1
+ 4, // DXN1UNORM
+ 4, // DXN1SNORM
4, // DXN2UNORM
4, // DXN2SNORM
4, // BC7U
@@ -352,6 +358,7 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{
1, // ABGR8I
1, // ABGR8UI
1, // B5G6R5U
+ 1, // R5G6B5U
1, // B5G5R5A1U
1, // A2B10G10R10U
1, // A2B10G10R10UI
@@ -370,7 +377,8 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{
4, // DXT1
4, // DXT23
4, // DXT45
- 4, // DXN1
+ 4, // DXN1UNORM
+ 4, // DXN1SNORM
4, // DXN2UNORM
4, // DXN2SNORM
4, // BC7U
@@ -452,6 +460,7 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{
32, // ABGR8I
32, // ABGR8UI
16, // B5G6R5U
+ 16, // R5G6B5U
16, // B5G5R5A1U
32, // A2B10G10R10U
32, // A2B10G10R10UI
@@ -470,7 +479,8 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{
64, // DXT1
128, // DXT23
128, // DXT45
- 64, // DXN1
+ 64, // DXN1UNORM
+ 64, // DXN1SNORM
128, // DXN2UNORM
128, // DXN2SNORM
128, // BC7U
@@ -574,7 +584,4 @@ bool IsPixelFormatSRGB(PixelFormat format);
std::pair<u32, u32> GetASTCBlockSize(PixelFormat format);
-/// Returns true if the specified PixelFormat is a BCn format, e.g. DXT or DXN
-bool IsFormatBCn(PixelFormat format);
-
} // namespace VideoCore::Surface