mirror of https://github.com/PCSX2/pcsx2.git
GS: Make sure min/max for texture is at least 1 pixel
This commit is contained in:
parent
6fc631eaba
commit
a132a6f979
|
@ -4003,7 +4003,17 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCL
|
|||
|
||||
const bool inc_x = vr.x < tr.z;
|
||||
const bool inc_y = vr.y < tr.w;
|
||||
vr = (vr + GSVector4i(inc_x ? 0 : -1, inc_y ? 0 : -1, inc_x ? 1 : 0, inc_y ? 1 : 0).xxyy()).rintersect(tr);
|
||||
vr = (vr + GSVector4i(inc_x ? 0 : -1, inc_y ? 0 : -1, inc_x ? 1 : 0, inc_y ? 1 : 0)).rintersect(tr);
|
||||
}
|
||||
else if (vr.xzxz().rempty())
|
||||
{
|
||||
const bool inc_x = vr.x < tr.z;
|
||||
vr = (vr + GSVector4i(inc_x ? 0 : -1, 0, inc_x ? 1 : 0, 0)).rintersect(tr);
|
||||
}
|
||||
else if (vr.ywyw().rempty())
|
||||
{
|
||||
const bool inc_y = vr.y < tr.w;
|
||||
vr = (vr + GSVector4i(0, inc_y ? 0 : -1, 0, inc_y ? 1 : 0)).rintersect(tr);
|
||||
}
|
||||
|
||||
return { vr, uses_border };
|
||||
|
|
Loading…
Reference in New Issue