summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorGravatar bunnei2021-06-24 19:09:12 -0700
committerGravatar GitHub2021-06-24 19:09:12 -0700
commitb9c2732121e2594a64d1141807c7d5bd0f317d0f (patch)
tree700ab748e15d1e7d5cf7f58f2cbac133b7a84915 /src/video_core/texture_cache
parentMerge pull request #6522 from Morph1984/pragma (diff)
parentcommon: Replace common_sizes into user-literals (diff)
downloadyuzu-b9c2732121e2594a64d1141807c7d5bd0f317d0f.tar.gz
yuzu-b9c2732121e2594a64d1141807c7d5bd0f317d0f.tar.xz
yuzu-b9c2732121e2594a64d1141807c7d5bd0f317d0f.zip
Merge pull request #6519 from Wunkolo/mem-size-literal
common: Replace common_sizes into user-literals
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h12
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;
59using VideoCore::Surface::PixelFormatFromDepthFormat; 58using VideoCore::Surface::PixelFormatFromDepthFormat;
60using VideoCore::Surface::PixelFormatFromRenderTargetFormat; 59using VideoCore::Surface::PixelFormatFromRenderTargetFormat;
61using VideoCore::Surface::SurfaceType; 60using VideoCore::Surface::SurfaceType;
61using namespace Common::Literals;
62 62
63template <class P> 63template <class P>
64class TextureCache { 64class 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}