diff options
author | Subv <subv2112@gmail.com> | 2018-07-02 16:43:38 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-07-02 16:43:38 +0200 |
commit | 80c5e8ae99255fd2871e9500a5b26e5b5cb6b167 (patch) | |
tree | b66edd9bd08bfa3b59345cf94e253c298f1374a2 /src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |
parent | GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses. (diff) | |
download | yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar.gz yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar.bz2 yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar.lz yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar.xz yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.tar.zst yuzu-80c5e8ae99255fd2871e9500a5b26e5b5cb6b167.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 63f5999ea..44054f338 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -454,6 +454,11 @@ Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params) { return {}; } + const auto& gpu = Core::System::GetInstance().GPU(); + // Don't try to create any entries in the cache if the address of the texture is invalid. + if (gpu.memory_manager->GpuToCpuAddress(params.addr) == boost::none) + return {}; + // Check for an exact match in existing surfaces const auto& surface_key{SurfaceKey::Create(params)}; const auto& search{surface_cache.find(surface_key)}; |