mirror of https://github.com/PCSX2/pcsx2.git
GS:SW: Don't interpolate xy fields for scanlines
By that point, xy is what's being used to advance the scanline and won't be needed as a parameter
This commit is contained in:
parent
0cec99361b
commit
24de0866f7
|
@ -72,6 +72,13 @@ GSRasterizer::~GSRasterizer()
|
||||||
delete m_ds;
|
delete m_ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __fi AddScanlineInfo(GSVertexSW* e, int pixels, int left, int top)
|
||||||
|
{
|
||||||
|
e->_pad.I32[0] = pixels;
|
||||||
|
e->_pad.I32[1] = left;
|
||||||
|
e->_pad.I32[2] = top;
|
||||||
|
}
|
||||||
|
|
||||||
bool GSRasterizer::IsOneOfMyScanlines(int top) const
|
bool GSRasterizer::IsOneOfMyScanlines(int top) const
|
||||||
{
|
{
|
||||||
ASSERT(top >= 0 && top < 2048);
|
ASSERT(top >= 0 && top < 2048);
|
||||||
|
@ -579,12 +586,10 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW2& edge, c
|
||||||
float prestep = l.x - p0.x;
|
float prestep = l.x - p0.x;
|
||||||
GSVector8 prestepv(prestep);
|
GSVector8 prestepv(prestep);
|
||||||
|
|
||||||
GSVertexSW2 scan;
|
reinterpret_cast<GSVertexSW2*>(e)->p.F64[1] = edge.p.F64[1] + dedge.p.F64[1] * dy + dscan.p.F64[1] * prestep;
|
||||||
GSVector4::storel(&scan.p, xy + GSVector4::loadl(&dscan.p) * prestepv.extract<0>());
|
reinterpret_cast<GSVertexSW2*>(e)->tc = edge.tc + dedge.tc * dyv + dscan.tc * prestepv;
|
||||||
scan.p.F64[1] = edge.p.F64[1] + dedge.p.F64[1] * dy + dscan.p.F64[1] * prestep;
|
|
||||||
scan.tc = edge.tc + dedge.tc * dyv + dscan.tc * prestepv;
|
|
||||||
|
|
||||||
AddScanline(e++, pixels, left, top, (GSVertexSW&)scan);
|
AddScanlineInfo(e++, pixels, left, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
top++;
|
top++;
|
||||||
|
@ -758,13 +763,11 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& edge, co
|
||||||
{
|
{
|
||||||
const float prestep = l.x - p0.x;
|
const float prestep = l.x - p0.x;
|
||||||
|
|
||||||
GSVertexSW scan;
|
e->p.F64[1] = edge.p.F64[1] + dedge.p.F64[1] * dy + dscan.p.F64[1] * prestep;
|
||||||
GSVector4::storel(&scan.p, xy + GSVector4::loadl(&dscan.p) * prestep);
|
e->t = edge.t + dedge.t * dy + dscan.t * prestep;
|
||||||
scan.p.F64[1] = edge.p.F64[1] + dedge.p.F64[1] * dy + dscan.p.F64[1] * prestep;
|
e->c = edge.c + dedge.c * dy + dscan.c * prestep;
|
||||||
scan.t = edge.t + dedge.t * dy + dscan.t * prestep;
|
|
||||||
scan.c = edge.c + dedge.c * dy + dscan.c * prestep;
|
|
||||||
|
|
||||||
AddScanline(e++, pixels, left, top, scan);
|
AddScanlineInfo(e++, pixels, left, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
top++;
|
top++;
|
||||||
|
@ -1075,10 +1078,7 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
||||||
void GSRasterizer::AddScanline(GSVertexSW* e, int pixels, int left, int top, const GSVertexSW& scan)
|
void GSRasterizer::AddScanline(GSVertexSW* e, int pixels, int left, int top, const GSVertexSW& scan)
|
||||||
{
|
{
|
||||||
*e = scan;
|
*e = scan;
|
||||||
|
AddScanlineInfo(e, pixels, left, top);
|
||||||
e->_pad.I32[0] = pixels;
|
|
||||||
e->_pad.I32[1] = left;
|
|
||||||
e->_pad.I32[2] = top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRasterizer::Flush(const GSVertexSW* vertex, const u32* index, const GSVertexSW& dscan, bool edge)
|
void GSRasterizer::Flush(const GSVertexSW* vertex, const u32* index, const GSVertexSW& dscan, bool edge)
|
||||||
|
|
Loading…
Reference in New Issue