Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tohur
pcsx2-git
pcsx2-PR3444.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pcsx2-PR3444.patch of Package pcsx2-git
From beda6969ee3a8c40f1f4da47c851a24ce17fff8a Mon Sep 17 00:00:00 2001 From: Kojin <kojin@protonmail.com> Date: Sat, 6 Jun 2020 12:10:53 -0400 Subject: [PATCH] mgs workarounds --- plugins/GSdx/Renderers/Common/GSRenderer.cpp | 10 +++++----- plugins/GSdx/Renderers/SW/GSRasterizer.cpp | 7 +++++-- plugins/GSdx/Renderers/SW/GSRasterizer.h | 2 ++ plugins/GSdx/Renderers/SW/GSRendererSW.cpp | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/GSdx/Renderers/Common/GSRenderer.cpp b/plugins/GSdx/Renderers/Common/GSRenderer.cpp index e2881bb488..cedd6916fe 100644 --- a/plugins/GSdx/Renderers/Common/GSRenderer.cpp +++ b/plugins/GSdx/Renderers/Common/GSRenderer.cpp @@ -222,7 +222,7 @@ bool GSRenderer::Merge(int field) off.x = tex[i]->GetScale().x * frame_diff.x; } - if(display_diff.y >= 4) // Shouldn't this be >= 2? + if(display_diff.y) // Shouldn't this be >= 2? { off.y = tex[i]->GetScale().y * display_diff.y; @@ -231,10 +231,10 @@ bool GSRenderer::Merge(int field) off.y /= 2; } } - else if(display_diff.y != frame_diff.y) - { - off.y = tex[i]->GetScale().y * frame_diff.y; - } + //else if(display_diff.y != frame_diff.y) + //{ + // off.y = tex[i]->GetScale().y * frame_diff.y; + //} dst[i] = GSVector4(off).xyxy() + scale * GSVector4(r.rsize()); diff --git a/plugins/GSdx/Renderers/SW/GSRasterizer.cpp b/plugins/GSdx/Renderers/SW/GSRasterizer.cpp index c547c61488..a96bd0462a 100644 --- a/plugins/GSdx/Renderers/SW/GSRasterizer.cpp +++ b/plugins/GSdx/Renderers/SW/GSRasterizer.cpp @@ -155,6 +155,7 @@ void GSRasterizer::Draw(GSRasterizerData* data) bool scissor_test = !data->bbox.eq(data->bbox.rintersect(data->scissor)); m_scissor = data->scissor; + m_scanline_mask = data->scanline_mask; m_fscissor_x = GSVector4(data->scissor).xzxz(); m_fscissor_y = GSVector4(data->scissor).ywyw(); @@ -1086,8 +1087,10 @@ void GSRasterizer::Flush(const GSVertexSW* vertex, const uint32* index, const GS int pixels = e->_pad.i32[0]; int left = e->_pad.i32[1]; int top = e->_pad.i32[2]; - - DrawScanline(pixels, left, top, *e++); + if (!m_scanline_mask || m_scanline_mask == 3 && (top & 1) == 1 || m_scanline_mask == 2 && (top & 1) == 0) + DrawScanline(pixels, left, top, *e++); + else + *e++; } while(e < ee); } diff --git a/plugins/GSdx/Renderers/SW/GSRasterizer.h b/plugins/GSdx/Renderers/SW/GSRasterizer.h index 15857ec958..2023d9e84d 100644 --- a/plugins/GSdx/Renderers/SW/GSRasterizer.h +++ b/plugins/GSdx/Renderers/SW/GSRasterizer.h @@ -33,6 +33,7 @@ class alignas(32) GSRasterizerData : public GSAlignedClass<32> static int s_counter; public: + int scanline_mask; GSVector4i scissor; GSVector4i bbox; GS_PRIM_CLASS primclass; @@ -136,6 +137,7 @@ class alignas(32) GSRasterizer : public IRasterizer GSVector4 m_fscissor_y; struct {GSVertexSW* buff; int count;} m_edge; struct {int sum, actual, total;} m_pixels; + int m_scanline_mask; typedef void (GSRasterizer::*DrawPrimPtr)(const GSVertexSW* v, int count); diff --git a/plugins/GSdx/Renderers/SW/GSRendererSW.cpp b/plugins/GSdx/Renderers/SW/GSRendererSW.cpp index d7cd5d936f..f1119d9b95 100644 --- a/plugins/GSdx/Renderers/SW/GSRendererSW.cpp +++ b/plugins/GSdx/Renderers/SW/GSRendererSW.cpp @@ -398,6 +398,7 @@ void GSRendererSW::Draw() sd->vertex_count = m_vertex.next; sd->index = (uint32*)(sd->buff + sizeof(GSVertexSW) * ((m_vertex.next + 1) & ~1)); sd->index_count = m_index.tail; + sd->scanline_mask = m_env.SCANMSK.MSK; // skip per pixel division if q is constant. // Optimize the division by 1 with a nop. It also means that GS_SPRITE_CLASS must be processed when !m_vt.m_eq.q.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor