mirror of https://github.com/PCSX2/pcsx2.git
GS: Avoid pointlessly trying to map more pages in memory than the GS has
This commit is contained in:
parent
7e53cb8e99
commit
fc4bdfd025
|
@ -371,6 +371,13 @@ std::vector<GSVector2i>* GSLocalMemory::GetPage2TileMap(const GIFRegTEX0& TEX0)
|
||||||
int tw = std::max<int>(1 << TEX0.TW, bs.x);
|
int tw = std::max<int>(1 << TEX0.TW, bs.x);
|
||||||
int th = std::max<int>(1 << TEX0.TH, bs.y);
|
int th = std::max<int>(1 << TEX0.TH, bs.y);
|
||||||
|
|
||||||
|
// Limit the size to the maximum size of the GS memory, there's no point in mapping more than this.
|
||||||
|
if ((tw * th) > VM_SIZE)
|
||||||
|
{
|
||||||
|
tw = 2048;
|
||||||
|
th = 2048;
|
||||||
|
}
|
||||||
|
|
||||||
GSOffset off = GetOffset(TEX0.TBP0, TEX0.TBW, TEX0.PSM);
|
GSOffset off = GetOffset(TEX0.TBP0, TEX0.TBW, TEX0.PSM);
|
||||||
GSOffset::BNHelper bn = off.bnMulti(0, 0);
|
GSOffset::BNHelper bn = off.bnMulti(0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue