diff options
| author | 2021-06-23 14:18:27 -0700 | |
|---|---|---|
| committer | 2021-06-24 09:27:40 -0700 | |
| commit | 4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c (patch) | |
| tree | 591792bc47e26bc812e753b0891aab94a8a88352 /src/video_core/texture_cache | |
| parent | Merge pull request #6504 from Kelebek1/samples-played (diff) | |
| download | yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.tar.gz yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.tar.xz yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.zip | |
common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.
To keep the global namespace clean, users will have to use:
```
using namespace Common::Literals;
```
to access these literals.
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index e7f8478b4..84530a179 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -19,9 +19,8 @@ | |||
| 19 | #include <boost/container/small_vector.hpp> | 19 | #include <boost/container/small_vector.hpp> |
| 20 | 20 | ||
| 21 | #include "common/alignment.h" | 21 | #include "common/alignment.h" |
| 22 | #include "common/common_funcs.h" | ||
| 23 | #include "common/common_sizes.h" | ||
| 24 | #include "common/common_types.h" | 22 | #include "common/common_types.h" |
| 23 | #include "common/literals.h" | ||
| 25 | #include "common/logging/log.h" | 24 | #include "common/logging/log.h" |
| 26 | #include "common/settings.h" | 25 | #include "common/settings.h" |
| 27 | #include "video_core/compatible_formats.h" | 26 | #include "video_core/compatible_formats.h" |
| @@ -59,6 +58,7 @@ using VideoCore::Surface::PixelFormat; | |||
| 59 | using VideoCore::Surface::PixelFormatFromDepthFormat; | 58 | using VideoCore::Surface::PixelFormatFromDepthFormat; |
| 60 | using VideoCore::Surface::PixelFormatFromRenderTargetFormat; | 59 | using VideoCore::Surface::PixelFormatFromRenderTargetFormat; |
| 61 | using VideoCore::Surface::SurfaceType; | 60 | using VideoCore::Surface::SurfaceType; |
| 61 | using namespace Common::Literals; | ||
| 62 | 62 | ||
| 63 | template <class P> | 63 | template <class P> |
| 64 | class TextureCache { | 64 | class TextureCache { |
| @@ -79,8 +79,8 @@ class TextureCache { | |||
| 79 | /// Sampler ID for bugged sampler ids | 79 | /// Sampler ID for bugged sampler ids |
| 80 | static constexpr SamplerId NULL_SAMPLER_ID{0}; | 80 | static constexpr SamplerId NULL_SAMPLER_ID{0}; |
| 81 | 81 | ||
| 82 | static constexpr u64 DEFAULT_EXPECTED_MEMORY = Common::Size_1_GB; | 82 | static constexpr u64 DEFAULT_EXPECTED_MEMORY = 1_GiB; |
| 83 | static constexpr u64 DEFAULT_CRITICAL_MEMORY = Common::Size_2_GB; | 83 | static constexpr u64 DEFAULT_CRITICAL_MEMORY = 2_GiB; |
| 84 | 84 | ||
| 85 | using Runtime = typename P::Runtime; | 85 | using Runtime = typename P::Runtime; |
| 86 | using Image = typename P::Image; | 86 | using Image = typename P::Image; |
| @@ -400,8 +400,8 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface& | |||
| 400 | minimum_memory = 0; | 400 | minimum_memory = 0; |
| 401 | } else { | 401 | } else { |
| 402 | // on OGL we can be more conservatives as the driver takes care. | 402 | // on OGL we can be more conservatives as the driver takes care. |
| 403 | expected_memory = DEFAULT_EXPECTED_MEMORY + Common::Size_512_MB; | 403 | expected_memory = DEFAULT_EXPECTED_MEMORY + 512_MiB; |
| 404 | critical_memory = DEFAULT_CRITICAL_MEMORY + Common::Size_1_GB; | 404 | critical_memory = DEFAULT_CRITICAL_MEMORY + 1_GiB; |
| 405 | minimum_memory = expected_memory; | 405 | minimum_memory = expected_memory; |
| 406 | } | 406 | } |
| 407 | } | 407 | } |