summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-01-16 06:34:43 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-03-25 01:51:52 +0100
commit9edbbf2af401f821c0be6a266e65975e3de25fb3 (patch)
tree16bc11bc0097e80e8b39e7cc990a81448f7bf059 /src/video_core/renderer_opengl
parentBuffer Cache: Tune to the levels of the new GC. (diff)
downloadyuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar.gz
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar.bz2
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar.lz
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar.xz
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.tar.zst
yuzu-9edbbf2af401f821c0be6a266e65975e3de25fb3.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_buffer_cache.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
index 45db72e6f..f73b0af5f 100644
--- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
@@ -150,7 +150,7 @@ u64 BufferCacheRuntime::GetDeviceMemoryUsage() const {
if (GLAD_GL_NVX_gpu_memory_info) {
GLint cur_avail_mem_kb = 0;
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &cur_avail_mem_kb);
- return static_cast<u64>(cur_avail_mem_kb) * 1_KiB;
+ return device_access_memory - static_cast<u64>(cur_avail_mem_kb) * 1_KiB;
}
return 2_GiB;
}
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 40f52eacb..63586d9d5 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -513,7 +513,7 @@ u64 TextureCacheRuntime::GetDeviceMemoryUsage() const {
if (GLAD_GL_NVX_gpu_memory_info) {
GLint cur_avail_mem_kb = 0;
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &cur_avail_mem_kb);
- return static_cast<u64>(cur_avail_mem_kb) * 1_KiB;
+ return device_access_memory - static_cast<u64>(cur_avail_mem_kb) * 1_KiB;
}
return 2_GiB;
}
@@ -695,7 +695,7 @@ Image::Image(TextureCacheRuntime& runtime_, const VideoCommon::ImageInfo& info_,
}
if (IsConverted(runtime->device, info.format, info.type)) {
flags |= ImageFlagBits::Converted;
- flags |= ImageFlagBits::GCProtected;
+ flags |= ImageFlagBits::CostlyLoad;
gl_internal_format = IsPixelFormatSRGB(info.format) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
gl_format = GL_RGBA;
gl_type = GL_UNSIGNED_INT_8_8_8_8_REV;