summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-10 12:13:32 -0400
committerGravatar GitHub2018-08-10 12:13:32 -0400
commit57626fda7bd90f4bfd7ce01e2d00f84d9b1724a0 (patch)
tree1563aa9d6d8c6bd689ba8a3acee0ae0f8d11ddf6
parentMerge pull request #1008 from yuzu-emu/revert-697-disable-depth-cull (diff)
parentgl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfac... (diff)
downloadyuzu-57626fda7bd90f4bfd7ce01e2d00f84d9b1724a0.tar.gz
yuzu-57626fda7bd90f4bfd7ce01e2d00f84d9b1724a0.tar.xz
yuzu-57626fda7bd90f4bfd7ce01e2d00f84d9b1724a0.zip
Merge pull request #1004 from lioncash/unused
gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h3
3 files changed, 6 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index bed14d5fe..8360feb5d 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -332,8 +332,6 @@ std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_c
332 // TODO(bunnei): Implement this 332 // TODO(bunnei): Implement this
333 const bool has_stencil = false; 333 const bool has_stencil = false;
334 334
335 const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
336
337 const bool write_color_fb = 335 const bool write_color_fb =
338 state.color_mask.red_enabled == GL_TRUE || state.color_mask.green_enabled == GL_TRUE || 336 state.color_mask.red_enabled == GL_TRUE || state.color_mask.green_enabled == GL_TRUE ||
339 state.color_mask.blue_enabled == GL_TRUE || state.color_mask.alpha_enabled == GL_TRUE; 337 state.color_mask.blue_enabled == GL_TRUE || state.color_mask.alpha_enabled == GL_TRUE;
@@ -346,9 +344,10 @@ std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_c
346 Surface depth_surface; 344 Surface depth_surface;
347 MathUtil::Rectangle<u32> surfaces_rect; 345 MathUtil::Rectangle<u32> surfaces_rect;
348 std::tie(color_surface, depth_surface, surfaces_rect) = 346 std::tie(color_surface, depth_surface, surfaces_rect) =
349 res_cache.GetFramebufferSurfaces(using_color_fb, using_depth_fb, viewport_rect); 347 res_cache.GetFramebufferSurfaces(using_color_fb, using_depth_fb);
350 348
351 MathUtil::Rectangle<u32> draw_rect{ 349 const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
350 const MathUtil::Rectangle<u32> draw_rect{
352 static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.left) + viewport_rect.left, 351 static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.left) + viewport_rect.left,
353 surfaces_rect.left, surfaces_rect.right)), // Left 352 surfaces_rect.left, surfaces_rect.right)), // Left
354 static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.bottom) + viewport_rect.top, 353 static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.bottom) + viewport_rect.top,
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 885403cd0..9fb734b77 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -622,8 +622,8 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu
622 return GetSurface(SurfaceParams::CreateForTexture(config)); 622 return GetSurface(SurfaceParams::CreateForTexture(config));
623} 623}
624 624
625SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( 625SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(bool using_color_fb,
626 bool using_color_fb, bool using_depth_fb, const MathUtil::Rectangle<s32>& viewport) { 626 bool using_depth_fb) {
627 const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; 627 const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
628 628
629 // TODO(bunnei): This is hard corded to use just the first render buffer 629 // TODO(bunnei): This is hard corded to use just the first render buffer
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
index 36213c403..829a76dfe 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -548,8 +548,7 @@ public:
548 Surface GetTextureSurface(const Tegra::Texture::FullTextureInfo& config); 548 Surface GetTextureSurface(const Tegra::Texture::FullTextureInfo& config);
549 549
550 /// Get the color and depth surfaces based on the framebuffer configuration 550 /// Get the color and depth surfaces based on the framebuffer configuration
551 SurfaceSurfaceRect_Tuple GetFramebufferSurfaces(bool using_color_fb, bool using_depth_fb, 551 SurfaceSurfaceRect_Tuple GetFramebufferSurfaces(bool using_color_fb, bool using_depth_fb);
552 const MathUtil::Rectangle<s32>& viewport);
553 552
554 /// Flushes the surface to Switch memory 553 /// Flushes the surface to Switch memory
555 void FlushSurface(const Surface& surface); 554 void FlushSurface(const Surface& surface);