summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-06-29 19:08:08 +0200
committerbunnei <bunneidev@gmail.com>2018-06-29 19:08:08 +0200
commitc18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193 (patch)
treecbee8e53a5260571c3abf00cf9ad2d32201a0288 /src/video_core
parentgl_rasterizer_cache: Implement caching for texture and framebuffer surfaces. (diff)
downloadyuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.gz
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.bz2
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.lz
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.xz
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.zst
yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 71ad7be74..63f5999ea 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -398,14 +398,18 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
Surface color_surface;
if (using_color_fb) {
color_surface = GetSurface(color_params);
- color_rect = color_surface->GetSurfaceParams().GetRect();
+ if (color_surface) {
+ color_rect = color_surface->GetSurfaceParams().GetRect();
+ }
}
MathUtil::Rectangle<u32> depth_rect{};
Surface depth_surface;
if (using_depth_fb) {
depth_surface = GetSurface(depth_params);
- depth_rect = depth_surface->GetSurfaceParams().GetRect();
+ if (depth_surface) {
+ depth_rect = depth_surface->GetSurfaceParams().GetRect();
+ }
}
MathUtil::Rectangle<u32> fb_rect{};