diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-16 06:32:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-16 06:32:37 +0200 |
commit | a1138028a82d61f2cad2305686bf720966fabef9 (patch) | |
tree | ccb610c430c6e99a8a87c088d54c46d032b4fe88 /src/video_core/renderer_opengl/gl_texture_cache.cpp | |
parent | Merge pull request #6244 from german77/sdlmotion (diff) | |
parent | texture_cache: Handle out of bound texture blits (diff) | |
download | yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar.gz yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar.bz2 yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar.lz yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar.xz yuzu-a1138028a82d61f2cad2305686bf720966fabef9.tar.zst yuzu-a1138028a82d61f2cad2305686bf720966fabef9.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 623b43d8a..ffe9edc1b 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -543,8 +543,7 @@ void TextureCacheRuntime::EmulateCopyImage(Image& dst, Image& src, } void TextureCacheRuntime::BlitFramebuffer(Framebuffer* dst, Framebuffer* src, - const std::array<Offset2D, 2>& dst_region, - const std::array<Offset2D, 2>& src_region, + const Region2D& dst_region, const Region2D& src_region, Tegra::Engines::Fermi2D::Filter filter, Tegra::Engines::Fermi2D::Operation operation) { state_tracker.NotifyScissor0(); @@ -560,9 +559,9 @@ void TextureCacheRuntime::BlitFramebuffer(Framebuffer* dst, Framebuffer* src, const GLbitfield buffer_bits = dst->BufferBits(); const bool has_depth = (buffer_bits & ~GL_COLOR_BUFFER_BIT) != 0; const bool is_linear = !has_depth && filter == Tegra::Engines::Fermi2D::Filter::Bilinear; - glBlitNamedFramebuffer(src->Handle(), dst->Handle(), src_region[0].x, src_region[0].y, - src_region[1].x, src_region[1].y, dst_region[0].x, dst_region[0].y, - dst_region[1].x, dst_region[1].y, buffer_bits, + glBlitNamedFramebuffer(src->Handle(), dst->Handle(), src_region.start.x, src_region.start.y, + src_region.end.x, src_region.end.y, dst_region.start.x, + dst_region.start.y, dst_region.end.x, dst_region.end.y, buffer_bits, is_linear ? GL_LINEAR : GL_NEAREST); } |