mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-30 19:44:16 +01:00
Merge pull request #1004 from lioncash/unused
gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()
This commit is contained in:
commit
57626fda7b
@ -332,8 +332,6 @@ std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_c
|
|||||||
// TODO(bunnei): Implement this
|
// TODO(bunnei): Implement this
|
||||||
const bool has_stencil = false;
|
const bool has_stencil = false;
|
||||||
|
|
||||||
const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
|
|
||||||
|
|
||||||
const bool write_color_fb =
|
const bool write_color_fb =
|
||||||
state.color_mask.red_enabled == GL_TRUE || state.color_mask.green_enabled == GL_TRUE ||
|
state.color_mask.red_enabled == GL_TRUE || state.color_mask.green_enabled == GL_TRUE ||
|
||||||
state.color_mask.blue_enabled == GL_TRUE || state.color_mask.alpha_enabled == GL_TRUE;
|
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
|
|||||||
Surface depth_surface;
|
Surface depth_surface;
|
||||||
MathUtil::Rectangle<u32> surfaces_rect;
|
MathUtil::Rectangle<u32> surfaces_rect;
|
||||||
std::tie(color_surface, depth_surface, surfaces_rect) =
|
std::tie(color_surface, depth_surface, surfaces_rect) =
|
||||||
res_cache.GetFramebufferSurfaces(using_color_fb, using_depth_fb, viewport_rect);
|
res_cache.GetFramebufferSurfaces(using_color_fb, using_depth_fb);
|
||||||
|
|
||||||
MathUtil::Rectangle<u32> draw_rect{
|
const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
|
||||||
|
const MathUtil::Rectangle<u32> draw_rect{
|
||||||
static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.left) + viewport_rect.left,
|
static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.left) + viewport_rect.left,
|
||||||
surfaces_rect.left, surfaces_rect.right)), // Left
|
surfaces_rect.left, surfaces_rect.right)), // Left
|
||||||
static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.bottom) + viewport_rect.top,
|
static_cast<u32>(std::clamp<s32>(static_cast<s32>(surfaces_rect.bottom) + viewport_rect.top,
|
||||||
|
@ -622,8 +622,8 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu
|
|||||||
return GetSurface(SurfaceParams::CreateForTexture(config));
|
return GetSurface(SurfaceParams::CreateForTexture(config));
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(bool using_color_fb,
|
||||||
bool using_color_fb, bool using_depth_fb, const MathUtil::Rectangle<s32>& viewport) {
|
bool using_depth_fb) {
|
||||||
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
||||||
|
|
||||||
// TODO(bunnei): This is hard corded to use just the first render buffer
|
// TODO(bunnei): This is hard corded to use just the first render buffer
|
||||||
|
@ -548,8 +548,7 @@ public:
|
|||||||
Surface GetTextureSurface(const Tegra::Texture::FullTextureInfo& config);
|
Surface GetTextureSurface(const Tegra::Texture::FullTextureInfo& config);
|
||||||
|
|
||||||
/// Get the color and depth surfaces based on the framebuffer configuration
|
/// Get the color and depth surfaces based on the framebuffer configuration
|
||||||
SurfaceSurfaceRect_Tuple GetFramebufferSurfaces(bool using_color_fb, bool using_depth_fb,
|
SurfaceSurfaceRect_Tuple GetFramebufferSurfaces(bool using_color_fb, bool using_depth_fb);
|
||||||
const MathUtil::Rectangle<s32>& viewport);
|
|
||||||
|
|
||||||
/// Flushes the surface to Switch memory
|
/// Flushes the surface to Switch memory
|
||||||
void FlushSurface(const Surface& surface);
|
void FlushSurface(const Surface& surface);
|
||||||
|
Loading…
Reference in New Issue
Block a user