mirror of https://github.com/PCSX2/pcsx2.git
gsdx: fixed some of the renames where it made no sense, also added a commend about lupin 3rd.
This commit is contained in:
parent
762930516a
commit
d631030608
|
@ -173,7 +173,7 @@ void GSDrawScanline::SetupPrim(const GSVertexSW* vertex, const uint32* index, co
|
|||
m_local.d8.stq = dt8;
|
||||
}
|
||||
|
||||
GSVector8 dTex(dscan.t);
|
||||
GSVector8 dt(dscan.t);
|
||||
|
||||
for(int j = 0, k = sel.fst ? 2 : 3; j < k; j++)
|
||||
{
|
||||
|
@ -181,9 +181,9 @@ void GSDrawScanline::SetupPrim(const GSVertexSW* vertex, const uint32* index, co
|
|||
|
||||
switch(j)
|
||||
{
|
||||
case 0: dstq = dTex.xxxx(); break;
|
||||
case 1: dstq = dTex.yyyy(); break;
|
||||
case 2: dstq = dTex.zzzz(); break;
|
||||
case 0: dstq = dt.xxxx(); break;
|
||||
case 1: dstq = dt.yyyy(); break;
|
||||
case 2: dstq = dt.zzzz(); break;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
|
@ -221,12 +221,12 @@ void GSDrawScanline::SetupPrim(const GSVertexSW* vertex, const uint32* index, co
|
|||
|
||||
GSVector8 dc(dscan.c);
|
||||
|
||||
GSVector8 dRect = dc.xxxx();
|
||||
GSVector8 dr = dc.xxxx();
|
||||
GSVector8 db = dc.zzzz();
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
GSVector8i r = GSVector8i(dRect * shift[1 + i]).ps32();
|
||||
GSVector8i r = GSVector8i(dr * shift[1 + i]).ps32();
|
||||
GSVector8i b = GSVector8i(db * shift[1 + i]).ps32();
|
||||
|
||||
m_local.d[i].rb = r.upl16(b);
|
||||
|
@ -367,12 +367,12 @@ void GSDrawScanline::SetupPrim(const GSVertexSW* vertex, const uint32* index, co
|
|||
{
|
||||
m_local.d4.c = GSVector4i(dscan.c * shift[0]).xzyw().ps32();
|
||||
|
||||
GSVector4 dRect = dscan.c.xxxx();
|
||||
GSVector4 dr = dscan.c.xxxx();
|
||||
GSVector4 db = dscan.c.zzzz();
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
GSVector4i r = GSVector4i(dRect * shift[1 + i]).ps32();
|
||||
GSVector4i r = GSVector4i(dr * shift[1 + i]).ps32();
|
||||
GSVector4i b = GSVector4i(db * shift[1 + i]).ps32();
|
||||
|
||||
m_local.d[i].rb = r.upl16(b);
|
||||
|
|
|
@ -571,13 +571,13 @@ void GSDrawScanlineCodeGenerator::TestZ(const Xmm& temp1, const Xmm& temp2)
|
|||
|
||||
if(m_sel.zoverflow || m_sel.zpsm == 0)
|
||||
{
|
||||
// GSVector4i off = GSVector4i::x80000000();
|
||||
// GSVector4i o = GSVector4i::x80000000();
|
||||
|
||||
vpcmpeqd(xmm2, xmm2);
|
||||
vpslld(xmm2, 31);
|
||||
|
||||
// GSVector4i zso = zs - off;
|
||||
// GSVector4i zdo = zd - off;
|
||||
// GSVector4i zso = zs - o;
|
||||
// GSVector4i zdo = zd - o;
|
||||
|
||||
vpsubd(xmm0, xmm2);
|
||||
vpsubd(xmm1, xmm2);
|
||||
|
|
|
@ -660,13 +660,13 @@ void GSDrawScanlineCodeGenerator::TestZ(const Xmm& temp1, const Xmm& temp2)
|
|||
|
||||
if(m_sel.zoverflow || m_sel.zpsm == 0)
|
||||
{
|
||||
// GSVector4i off = GSVector4i::x80000000();
|
||||
// GSVector4i o = GSVector4i::x80000000();
|
||||
|
||||
vpcmpeqd(temp1, temp1);
|
||||
vpslld(temp1, 31);
|
||||
|
||||
// GSVector4i zso = zs - off;
|
||||
// GSVector4i zdo = zd - off;
|
||||
// GSVector4i zso = zs - o;
|
||||
// GSVector4i zdo = zd - o;
|
||||
|
||||
vpsubd(xmm0, temp1);
|
||||
vpsubd(xmm1, temp1);
|
||||
|
|
|
@ -661,13 +661,13 @@ void GSDrawScanlineCodeGenerator::TestZ(const Ymm& temp1, const Ymm& temp2)
|
|||
|
||||
if(m_sel.zoverflow || m_sel.zpsm == 0)
|
||||
{
|
||||
// GSVector8i off = GSVector8i::x80000000();
|
||||
// GSVector8i o = GSVector8i::x80000000();
|
||||
|
||||
vpcmpeqd(temp1, temp1);
|
||||
vpslld(temp1, 31);
|
||||
|
||||
// GSVector8i zso = zs - off;
|
||||
// GSVector8i zdo = zd - off;
|
||||
// GSVector8i zso = zs - o;
|
||||
// GSVector8i zdo = zd - o;
|
||||
|
||||
vpsubd(ymm0, temp1);
|
||||
vpsubd(ymm1, temp1);
|
||||
|
|
|
@ -664,13 +664,13 @@ void GSDrawScanlineCodeGenerator::TestZ(const Xmm& temp1, const Xmm& temp2)
|
|||
|
||||
if(m_sel.zoverflow || m_sel.zpsm == 0)
|
||||
{
|
||||
// GSVector4i off = GSVector4i::x80000000();
|
||||
// GSVector4i o = GSVector4i::x80000000();
|
||||
|
||||
pcmpeqd(temp1, temp1);
|
||||
pslld(temp1, 31);
|
||||
|
||||
// GSVector4i zso = zs - off;
|
||||
// GSVector4i zdo = zd - off;
|
||||
// GSVector4i zso = zs - o;
|
||||
// GSVector4i zdo = zd - o;
|
||||
|
||||
psubd(xmm0, temp1);
|
||||
psubd(xmm1, temp1);
|
||||
|
|
|
@ -828,13 +828,13 @@ void GSRasterizer::DrawSprite(const GSVertexSW* vertex, const uint32* index)
|
|||
|
||||
GSVertexSW dv = v[1] - v[0];
|
||||
|
||||
GSVector4 dTex = dv.t / dv.p.xyxy();
|
||||
GSVector4 dt = dv.t / dv.p.xyxy();
|
||||
|
||||
GSVertexSW dedge;
|
||||
GSVertexSW dscan;
|
||||
|
||||
dedge.t = GSVector4::zero().insert32<1, 1>(dTex);
|
||||
dscan.t = GSVector4::zero().insert32<0, 0>(dTex);
|
||||
dedge.t = GSVector4::zero().insert32<1, 1>(dt);
|
||||
dscan.t = GSVector4::zero().insert32<0, 0>(dt);
|
||||
|
||||
GSVector4 prestep = GSVector4(r.left, r.top) - scan.p;
|
||||
|
||||
|
@ -876,9 +876,9 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
if(orientation)
|
||||
{
|
||||
GSVector4 tbf = v0.p.yyyy(v1.p).ceil(); // t t b b
|
||||
GSVector4 tbmax = tbf.max(m_fscissor_y); // max(t, sTex) max(t, sb) max(b, sTex) max(b, sb)
|
||||
GSVector4 tbmin = tbf.min(m_fscissor_y); // min(t, sTex) min(t, sb) min(b, sTex) min(b, sb)
|
||||
GSVector4i tb = GSVector4i(tbmax.xzyw(tbmin)); // max(t, sTex) max(b, sb) min(t, sTex) min(b, sb)
|
||||
GSVector4 tbmax = tbf.max(m_fscissor_y); // max(t, st) max(t, sb) max(b, st) max(b, sb)
|
||||
GSVector4 tbmin = tbf.min(m_fscissor_y); // min(t, st) min(t, sb) min(b, st) min(b, sb)
|
||||
GSVector4i tb = GSVector4i(tbmax.xzyw(tbmin)); // max(t, st) max(b, sb) min(t, st) min(b, sb)
|
||||
|
||||
int top, bottom;
|
||||
|
||||
|
@ -886,7 +886,7 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
|
||||
if((dv.p >= GSVector4::zero()).mask() & 2)
|
||||
{
|
||||
top = tb.extract32<0>(); // max(t, sTex)
|
||||
top = tb.extract32<0>(); // max(t, st)
|
||||
bottom = tb.extract32<3>(); // min(b, sb)
|
||||
|
||||
if(top >= bottom) return;
|
||||
|
@ -898,7 +898,7 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
}
|
||||
else
|
||||
{
|
||||
top = tb.extract32<1>(); // max(b, sTex)
|
||||
top = tb.extract32<1>(); // max(b, st)
|
||||
bottom = tb.extract32<2>(); // min(t, sb)
|
||||
|
||||
if(top >= bottom) return;
|
||||
|
@ -962,9 +962,9 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
else
|
||||
{
|
||||
GSVector4 lrf = v0.p.xxxx(v1.p).ceil(); // l l r r
|
||||
GSVector4 lrmax = lrf.max(m_fscissor_x); // max(l, sl) max(l, sRect) max(r, sl) max(r, sRect)
|
||||
GSVector4 lrmin = lrf.min(m_fscissor_x); // min(l, sl) min(l, sRect) min(r, sl) min(r, sRect)
|
||||
GSVector4i lr = GSVector4i(lrmax.xzyw(lrmin)); // max(l, sl) max(r, sl) min(l, sRect) min(r, sRect)
|
||||
GSVector4 lrmax = lrf.max(m_fscissor_x); // max(l, sl) max(l, sr) max(r, sl) max(r, sr)
|
||||
GSVector4 lrmin = lrf.min(m_fscissor_x); // min(l, sl) min(l, sr) min(r, sl) min(r, sr)
|
||||
GSVector4i lr = GSVector4i(lrmax.xzyw(lrmin)); // max(l, sl) max(r, sl) min(l, sr) min(r, sr)
|
||||
|
||||
int left, right;
|
||||
|
||||
|
@ -973,7 +973,7 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
if((dv.p >= GSVector4::zero()).mask() & 1)
|
||||
{
|
||||
left = lr.extract32<0>(); // max(l, sl)
|
||||
right = lr.extract32<3>(); // min(r, sRect)
|
||||
right = lr.extract32<3>(); // min(r, sr)
|
||||
|
||||
if(left >= right) return;
|
||||
|
||||
|
@ -985,7 +985,7 @@ void GSRasterizer::DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GS
|
|||
else
|
||||
{
|
||||
left = lr.extract32<1>(); // max(r, sl)
|
||||
right = lr.extract32<2>(); // min(l, sRect)
|
||||
right = lr.extract32<2>(); // min(l, sr)
|
||||
|
||||
if(left >= right) return;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ bool GSRenderer::Merge(int field)
|
|||
bool en[2];
|
||||
|
||||
GSVector4i fr[2];
|
||||
GSVector4i dRect[2];
|
||||
GSVector4i dr[2];
|
||||
|
||||
int baseline = INT_MAX;
|
||||
|
||||
|
@ -103,11 +103,11 @@ bool GSRenderer::Merge(int field)
|
|||
if(en[i])
|
||||
{
|
||||
fr[i] = GetFrameRect(i);
|
||||
dRect[i] = GetDisplayRect(i);
|
||||
dr[i] = GetDisplayRect(i);
|
||||
|
||||
baseline = min(dRect[i].top, baseline);
|
||||
baseline = min(dr[i].top, baseline);
|
||||
|
||||
//printf("[%d]: %d %d %d %d, %d %d %d %d\n", i, fr[i].x,fr[i].y,fr[i].z,fr[i].w , dRect[i].x,dRect[i].y,dRect[i].z,dRect[i].w);
|
||||
//printf("[%d]: %d %d %d %d, %d %d %d %d\n", i, fr[i].x,fr[i].y,fr[i].z,fr[i].w , dr[i].x,dr[i].y,dr[i].z,dr[i].w);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,15 +132,15 @@ bool GSRenderer::Merge(int field)
|
|||
|
||||
if(samesrc /*&& m_regs->PMODE.SLBG == 0 && m_regs->PMODE.MMOD == 1 && m_regs->PMODE.ALP == 0x80*/)
|
||||
{
|
||||
if(fr[0].eq(fr[1] + GSVector4i(0, -1, 0, 0)) && dRect[0].eq(dRect[1] + GSVector4i(0, 0, 0, 1))
|
||||
|| fr[1].eq(fr[0] + GSVector4i(0, -1, 0, 0)) && dRect[1].eq(dRect[0] + GSVector4i(0, 0, 0, 1)))
|
||||
if(fr[0].eq(fr[1] + GSVector4i(0, -1, 0, 0)) && dr[0].eq(dr[1] + GSVector4i(0, 0, 0, 1))
|
||||
|| fr[1].eq(fr[0] + GSVector4i(0, -1, 0, 0)) && dr[1].eq(dr[0] + GSVector4i(0, 0, 0, 1)))
|
||||
{
|
||||
// persona 4:
|
||||
//
|
||||
// fr[0] = 0 0 640 448
|
||||
// fr[1] = 0 1 640 448
|
||||
// dRect[0] = 159 50 779 498
|
||||
// dRect[1] = 159 50 779 497
|
||||
// dr[0] = 159 50 779 498
|
||||
// dr[1] = 159 50 779 497
|
||||
//
|
||||
// second image shifted up by 1 pixel and blended over itself
|
||||
//
|
||||
|
@ -148,29 +148,29 @@ bool GSRenderer::Merge(int field)
|
|||
//
|
||||
// fr[0] = 0 1 512 448
|
||||
// fr[1] = 0 0 512 448
|
||||
// dRect[0] = 127 50 639 497
|
||||
// dRect[1] = 127 50 639 498
|
||||
// dr[0] = 127 50 639 497
|
||||
// dr[1] = 127 50 639 498
|
||||
//
|
||||
// same just the first image shifted
|
||||
|
||||
int top = min(fr[0].top, fr[1].top);
|
||||
int bottom = max(dRect[0].bottom, dRect[1].bottom);
|
||||
int bottom = max(dr[0].bottom, dr[1].bottom);
|
||||
|
||||
fr[0].top = top;
|
||||
fr[1].top = top;
|
||||
dRect[0].bottom = bottom;
|
||||
dRect[1].bottom = bottom;
|
||||
dr[0].bottom = bottom;
|
||||
dr[1].bottom = bottom;
|
||||
|
||||
// blurdetected = true;
|
||||
}
|
||||
else if(dRect[0].eq(dRect[1]) && (fr[0].eq(fr[1] + GSVector4i(0, 1, 0, 1)) || fr[1].eq(fr[0] + GSVector4i(0, 1, 0, 1))))
|
||||
else if(dr[0].eq(dr[1]) && (fr[0].eq(fr[1] + GSVector4i(0, 1, 0, 1)) || fr[1].eq(fr[0] + GSVector4i(0, 1, 0, 1))))
|
||||
{
|
||||
// dq5:
|
||||
//
|
||||
// fr[0] = 0 1 512 445
|
||||
// fr[1] = 0 0 512 444
|
||||
// dRect[0] = 127 50 639 494
|
||||
// dRect[1] = 127 50 639 494
|
||||
// dr[0] = 127 50 639 494
|
||||
// dr[1] = 127 50 639 494
|
||||
|
||||
int top = min(fr[0].top, fr[1].top);
|
||||
int bottom = min(fr[0].bottom, fr[1].bottom);
|
||||
|
@ -210,7 +210,7 @@ bool GSRenderer::Merge(int field)
|
|||
|
||||
// overscan hack
|
||||
|
||||
if(dRect[i].height() > 512) // hmm
|
||||
if(dr[i].height() > 512) // hmm
|
||||
{
|
||||
int y = GetDeviceSize(i).y;
|
||||
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD) y /= 2;
|
||||
|
@ -223,9 +223,9 @@ bool GSRenderer::Merge(int field)
|
|||
|
||||
GSVector2 off(0, 0);
|
||||
|
||||
if(dRect[i].top - baseline >= 4) // 2?
|
||||
if(dr[i].top - baseline >= 4) // 2?
|
||||
{
|
||||
off.y = tex[i]->GetScale().y * (dRect[i].top - baseline);
|
||||
off.y = tex[i]->GetScale().y * (dr[i].top - baseline);
|
||||
|
||||
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD)
|
||||
{
|
||||
|
|
|
@ -92,12 +92,12 @@ void GSRendererSW::VSync(int field)
|
|||
{
|
||||
fprintf(s_fp, "%lld\n", m_perfmon.GetFrame());
|
||||
|
||||
GSVector4i dRect = GetDisplayRect();
|
||||
GSVector4i dr = GetDisplayRect();
|
||||
GSVector4i fr = GetFrameRect();
|
||||
GSVector2i ds = GetDeviceSize();
|
||||
|
||||
fprintf(s_fp, "dRect %d %d %d %d, fr %d %d %d %d, ds %d %d\n",
|
||||
dRect.x, dRect.y, dRect.z, dRect.w,
|
||||
fprintf(s_fp, "dr %d %d %d %d, fr %d %d %d %d, ds %d %d\n",
|
||||
dr.x, dr.y, dr.z, dr.w,
|
||||
fr.x, fr.y, fr.z, fr.w,
|
||||
ds.x, ds.y);
|
||||
|
||||
|
@ -447,7 +447,8 @@ void GSRendererSW::Draw()
|
|||
sd->bbox = bbox;
|
||||
sd->frame = m_perfmon.GetFrame();
|
||||
|
||||
if(!GetScanlineGlobalData(sd)) {
|
||||
if(!GetScanlineGlobalData(sd))
|
||||
{
|
||||
s_n += 3; // Keep it sync with HW renderer
|
||||
return;
|
||||
}
|
||||
|
@ -522,7 +523,8 @@ void GSRendererSW::Draw()
|
|||
|
||||
string s;
|
||||
|
||||
if (s_n >= s_saven) {
|
||||
if(s_n >= s_saven)
|
||||
{
|
||||
// Dump Register state
|
||||
s = format("%05d_context.txt", s_n);
|
||||
|
||||
|
@ -598,7 +600,8 @@ void GSRendererSW::Draw()
|
|||
|
||||
s_n++;
|
||||
|
||||
if ((s_n - s_saven) > s_savel) {
|
||||
if((s_n - s_saven) > s_savel)
|
||||
{
|
||||
s_dump = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -499,12 +499,12 @@ void GSState::GIFPackedRegHandlerRGBA(const GIFPackedReg* RESTRICT r)
|
|||
|
||||
void GSState::GIFPackedRegHandlerSTQ(const GIFPackedReg* RESTRICT r)
|
||||
{
|
||||
GSVector4i sTex = GSVector4i::loadl(&r->u64[0]);
|
||||
GSVector4i st = GSVector4i::loadl(&r->u64[0]);
|
||||
GSVector4i q = GSVector4i::loadl(&r->u64[1]);
|
||||
|
||||
GSVector4i::storel(&m_v.ST, sTex);
|
||||
GSVector4i::storel(&m_v.ST, st);
|
||||
|
||||
q = q.blend8(GSVector4i::cast(GSVector4::m_one), q == GSVector4i::zero()); // character shadow in Vexx, q = 0 (sTex also 0 on the first 16 vertices), setting it to 1.0f to avoid div by zero later
|
||||
q = q.blend8(GSVector4i::cast(GSVector4::m_one), q == GSVector4i::zero()); // character shadow in Vexx, q = 0 (st also 0 on the first 16 vertices), setting it to 1.0f to avoid div by zero later
|
||||
|
||||
*(int*)&m_q = GSVector4i::store(q);
|
||||
|
||||
|
@ -594,7 +594,7 @@ void GSState::GIFPackedRegHandlerSTQRGBAXYZF2(const GIFPackedReg* RESTRICT r, ui
|
|||
|
||||
while(r < r_end)
|
||||
{
|
||||
GSVector4i sTex = GSVector4i::loadl(&r[0].u64[0]);
|
||||
GSVector4i st = GSVector4i::loadl(&r[0].u64[0]);
|
||||
GSVector4i q = GSVector4i::loadl(&r[0].u64[1]);
|
||||
GSVector4i rgba = (GSVector4i::load<false>(&r[1]) & GSVector4i::x000000ff()).ps32().pu16();
|
||||
/*
|
||||
|
@ -605,7 +605,7 @@ void GSState::GIFPackedRegHandlerSTQRGBAXYZF2(const GIFPackedReg* RESTRICT r, ui
|
|||
*/
|
||||
q = q.blend8(GSVector4i::cast(GSVector4::m_one), q == GSVector4i::zero()); // see GIFPackedRegHandlerSTQ
|
||||
|
||||
m_v.m[0] = sTex.upl64(rgba.upl32(q)); // TODO: only store the last one
|
||||
m_v.m[0] = st.upl64(rgba.upl32(q)); // TODO: only store the last one
|
||||
|
||||
GSVector4i xy = GSVector4i::loadl(&r[2].u64[0]);
|
||||
GSVector4i zf = GSVector4i::loadl(&r[2].u64[1]);
|
||||
|
@ -631,7 +631,7 @@ void GSState::GIFPackedRegHandlerSTQRGBAXYZ2(const GIFPackedReg* RESTRICT r, uin
|
|||
|
||||
while(r < r_end)
|
||||
{
|
||||
GSVector4i sTex = GSVector4i::loadl(&r[0].u64[0]);
|
||||
GSVector4i st = GSVector4i::loadl(&r[0].u64[0]);
|
||||
GSVector4i q = GSVector4i::loadl(&r[0].u64[1]);
|
||||
GSVector4i rgba = (GSVector4i::load<false>(&r[1]) & GSVector4i::x000000ff()).ps32().pu16();
|
||||
/*
|
||||
|
@ -642,7 +642,7 @@ void GSState::GIFPackedRegHandlerSTQRGBAXYZ2(const GIFPackedReg* RESTRICT r, uin
|
|||
*/
|
||||
q = q.blend8(GSVector4i::cast(GSVector4::m_one), q == GSVector4i::zero()); // see GIFPackedRegHandlerSTQ
|
||||
|
||||
m_v.m[0] = sTex.upl64(rgba.upl32(q)); // TODO: only store the last one
|
||||
m_v.m[0] = st.upl64(rgba.upl32(q)); // TODO: only store the last one
|
||||
|
||||
GSVector4i xy = GSVector4i::loadl(&r[2].u64[0]);
|
||||
GSVector4i z = GSVector4i::loadl(&r[2].u64[1]);
|
||||
|
@ -999,14 +999,14 @@ template<int i> void GSState::GIFRegHandlerTEX2(const GIFReg* RESTRICT r)
|
|||
|
||||
template<int i> void GSState::GIFRegHandlerXYOFFSET(const GIFReg* RESTRICT r)
|
||||
{
|
||||
GSVector4i off = (GSVector4i)r->XYOFFSET & GSVector4i::x0000ffff();
|
||||
GSVector4i o = (GSVector4i)r->XYOFFSET & GSVector4i::x0000ffff();
|
||||
|
||||
if(!off.eq(m_env.CTXT[i].XYOFFSET))
|
||||
if(!o.eq(m_env.CTXT[i].XYOFFSET))
|
||||
{
|
||||
Flush();
|
||||
}
|
||||
|
||||
m_env.CTXT[i].XYOFFSET = off;
|
||||
m_env.CTXT[i].XYOFFSET = o;
|
||||
|
||||
m_env.CTXT[i].UpdateScissor();
|
||||
|
||||
|
@ -2699,14 +2699,14 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
|
|||
|
||||
if(wms != CLAMP_REGION_REPEAT || wmt != CLAMP_REGION_REPEAT)
|
||||
{
|
||||
GSVector4 sTex = m_vt.m_min.t.xyxy(m_vt.m_max.t);
|
||||
GSVector4 st = m_vt.m_min.t.xyxy(m_vt.m_max.t);
|
||||
|
||||
if(linear)
|
||||
{
|
||||
sTex += GSVector4(-0.5f, 0.5f).xxyy();
|
||||
st += GSVector4(-0.5f, 0.5f).xxyy();
|
||||
}
|
||||
|
||||
GSVector4i uv = GSVector4i(sTex.floor());
|
||||
GSVector4i uv = GSVector4i(st.floor());
|
||||
|
||||
GSVector4i u, v;
|
||||
|
||||
|
@ -2784,6 +2784,7 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
|
|||
|
||||
// This really shouldn't happen now except with the clamping region set entirely outside the texture,
|
||||
// special handling should be written for that case.
|
||||
|
||||
if(vr.rempty())
|
||||
{
|
||||
// NOTE: this can happen when texcoords are all outside the texture or clamping area is zero, but we can't
|
||||
|
@ -2791,6 +2792,7 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
|
|||
// examples:
|
||||
// - THPS (no visible problems)
|
||||
// - NFSMW (strange rectangles on screen, might be unrelated)
|
||||
// - Lupin 3rd (huge problems, textures sizes seem to be randomly specified)
|
||||
|
||||
vr = (vr + GSVector4i(-1, +1).xxyy()).rintersect(tr);
|
||||
}
|
||||
|
|
|
@ -179,10 +179,10 @@ void GSVertexTrace::FindMinMax(const void* vertex, const uint32* index, int coun
|
|||
{
|
||||
GSVector4i uv(v[index[i]].m[1]);
|
||||
|
||||
GSVector4 sTex = GSVector4(uv.uph16()).xyxy();
|
||||
GSVector4 st = GSVector4(uv.uph16()).xyxy();
|
||||
|
||||
tmin = tmin.min(sTex);
|
||||
tmax = tmax.max(sTex);
|
||||
tmin = tmin.min(st);
|
||||
tmax = tmax.max(st);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,11 +445,11 @@ void GSVertexTrace::FindMinMax(const void* vertex, const uint32* index, int coun
|
|||
|
||||
#endif
|
||||
|
||||
GSVector4 off(context->XYOFFSET);
|
||||
GSVector4 o(context->XYOFFSET);
|
||||
GSVector4 s(1.0f / 16, 1.0f / 16, 2.0f, 1.0f);
|
||||
|
||||
m_min.p = (GSVector4(pmin) - off) * s;
|
||||
m_max.p = (GSVector4(pmax) - off) * s;
|
||||
m_min.p = (GSVector4(pmin) - o) * s;
|
||||
m_max.p = (GSVector4(pmax) - o) * s;
|
||||
|
||||
if(tme)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue