summaryrefslogtreecommitdiff
path: root/src/video_core/surface.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-05-13 00:40:12 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2022-05-13 00:51:11 -0400
commit370d3fa1e3114662a6e28e41b3d0a412d860d1a3 (patch)
treeb343fc8366016e07cc8a8cbc976d000db932c94b /src/video_core/surface.h
parentb3f8c7ce58cf3fa47be881e1dabea996657b8b76 (diff)
video_core/surface: Use u8 for PixelFormat block tables
Using this smaller type saves 33280 bytes in the compiled executable.
Diffstat (limited to 'src/video_core/surface.h')
-rw-r--r--src/video_core/surface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index 86fea61ae..75e055592 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -147,7 +147,7 @@ enum class SurfaceTarget {
TextureCubeArray,
};
-constexpr std::array<u32, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
+constexpr std::array<u8, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
1, // A8B8G8R8_UNORM
1, // A8B8G8R8_SNORM
1, // A8B8G8R8_SINT
@@ -249,7 +249,7 @@ constexpr u32 DefaultBlockWidth(PixelFormat format) {
return BLOCK_WIDTH_TABLE[static_cast<std::size_t>(format)];
}
-constexpr std::array<u32, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
+constexpr std::array<u8, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
1, // A8B8G8R8_UNORM
1, // A8B8G8R8_SNORM
1, // A8B8G8R8_SINT
@@ -351,7 +351,7 @@ constexpr u32 DefaultBlockHeight(PixelFormat format) {
return BLOCK_HEIGHT_TABLE[static_cast<std::size_t>(format)];
}
-constexpr std::array<u32, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
+constexpr std::array<u8, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
32, // A8B8G8R8_UNORM
32, // A8B8G8R8_SNORM
32, // A8B8G8R8_SINT