summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2021-03-19 23:52:47 -0700
committerGravatar bunnei2021-03-21 14:45:03 -0700
commit28be8aec9a4499206662a7bd74091706000e3d6d (patch)
treed751a30ae95ae0f60a381eb1caa815ad552439be /src/common
parenthle: kernel: k_address_space_info: Cleanup. (diff)
downloadyuzu-28be8aec9a4499206662a7bd74091706000e3d6d.tar.gz
yuzu-28be8aec9a4499206662a7bd74091706000e3d6d.tar.xz
yuzu-28be8aec9a4499206662a7bd74091706000e3d6d.zip
common: Move common sizes to their own header for code reuse.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt1
-rw-r--r--src/common/common_sizes.h23
2 files changed, 24 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 788516ded..7253c0f4d 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -109,6 +109,7 @@ add_library(common STATIC
109 cityhash.h 109 cityhash.h
110 common_funcs.h 110 common_funcs.h
111 common_paths.h 111 common_paths.h
112 common_sizes.h
112 common_types.h 113 common_types.h
113 concepts.h 114 concepts.h
114 div_ceil.h 115 div_ceil.h
diff --git a/src/common/common_sizes.h b/src/common/common_sizes.h
new file mode 100644
index 000000000..26425a57d
--- /dev/null
+++ b/src/common/common_sizes.h
@@ -0,0 +1,23 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_types.h"
8
9enum : u64 {
10 Size_1_MB = 0x100000ULL,
11 Size_2_MB = 2ULL * Size_1_MB,
12 Size_4_MB = 4ULL * Size_1_MB,
13 Size_14_MB = 14ULL * Size_1_MB,
14 Size_32_MB = 32ULL * Size_1_MB,
15 Size_128_MB = 128ULL * Size_1_MB,
16 Size_1_GB = 0x40000000ULL,
17 Size_2_GB = 2ULL * Size_1_GB,
18 Size_4_GB = 4ULL * Size_1_GB,
19 Size_6_GB = 6ULL * Size_1_GB,
20 Size_64_GB = 64ULL * Size_1_GB,
21 Size_512_GB = 512ULL * Size_1_GB,
22 Invalid = std::numeric_limits<u64>::max(),
23};