diff options
| author | 2015-07-19 22:40:57 -0400 | |
|---|---|---|
| committer | 2015-07-19 22:40:57 -0400 | |
| commit | 9a3b21bcf9932af5f7b90bb5034904fc7779ec21 (patch) | |
| tree | 77c5db1da1f0feeabcb97b92ecf5659dc93d7ac8 /src | |
| parent | Merge pull request #946 from archshift/update-frdu (diff) | |
| parent | GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't ex... (diff) | |
| download | yuzu-9a3b21bcf9932af5f7b90bb5034904fc7779ec21.tar.gz yuzu-9a3b21bcf9932af5f7b90bb5034904fc7779ec21.tar.xz yuzu-9a3b21bcf9932af5f7b90bb5034904fc7779ec21.zip | |
Merge pull request #944 from Subv/spam
GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 935a9f281..2db845da6 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -816,12 +816,16 @@ void RasterizerOpenGL::ReloadColorBuffer() { | |||
| 816 | } | 816 | } |
| 817 | 817 | ||
| 818 | void RasterizerOpenGL::ReloadDepthBuffer() { | 818 | void RasterizerOpenGL::ReloadDepthBuffer() { |
| 819 | PAddr depth_buffer_addr = Pica::g_state.regs.framebuffer.GetDepthBufferPhysicalAddress(); | ||
| 820 | |||
| 821 | if (depth_buffer_addr == 0) | ||
| 822 | return; | ||
| 823 | |||
| 819 | // TODO: Appears to work, but double-check endianness of depth values and order of depth-stencil | 824 | // TODO: Appears to work, but double-check endianness of depth values and order of depth-stencil |
| 820 | u8* depth_buffer = Memory::GetPhysicalPointer(Pica::g_state.regs.framebuffer.GetDepthBufferPhysicalAddress()); | 825 | u8* depth_buffer = Memory::GetPhysicalPointer(depth_buffer_addr); |
| 821 | 826 | ||
| 822 | if (depth_buffer == nullptr) { | 827 | if (depth_buffer == nullptr) |
| 823 | return; | 828 | return; |
| 824 | } | ||
| 825 | 829 | ||
| 826 | u32 bytes_per_pixel = Pica::Regs::BytesPerDepthPixel(fb_depth_texture.format); | 830 | u32 bytes_per_pixel = Pica::Regs::BytesPerDepthPixel(fb_depth_texture.format); |
| 827 | 831 | ||