diff options
author | Subv <subv2112@gmail.com> | 2015-08-24 18:08:01 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-08-24 18:28:28 +0200 |
commit | 583d777b1a844259e6a389c420281388fce68dc4 (patch) | |
tree | b84a7f57c572b7282c0b22ac724ca1d82a928c39 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | HWRasterizer: Implemented stencil ops 6 and 7. (diff) | |
download | yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar.gz yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar.bz2 yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar.lz yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar.xz yuzu-583d777b1a844259e6a389c420281388fce68dc4.tar.zst yuzu-583d777b1a844259e6a389c420281388fce68dc4.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 962c659e0..c3829d5c6 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -869,8 +869,15 @@ void RasterizerOpenGL::ReloadDepthBuffer() { state.Apply(); glActiveTexture(GL_TEXTURE0); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, fb_depth_texture.width, fb_depth_texture.height, - fb_depth_texture.gl_format, fb_depth_texture.gl_type, temp_fb_depth_buffer.get()); + if (fb_depth_texture.format == Pica::Regs::DepthFormat::D24S8) { + // TODO(Subv): There is a bug with Intel Windows drivers that makes glTexSubImage2D not change the stencil buffer. + // The bug has been reported to Intel (https://communities.intel.com/message/324464) + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, fb_depth_texture.width, fb_depth_texture.height, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, temp_fb_depth_buffer.get()); + } else { + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, fb_depth_texture.width, fb_depth_texture.height, + fb_depth_texture.gl_format, fb_depth_texture.gl_type, temp_fb_depth_buffer.get()); + } state.texture_units[0].texture_2d = 0; state.Apply(); |