mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
3D: keep the rasterizer from accidentally going out of bounds when given very flat X-major edge slopes.
this, by a fucking shitshow of butterfly effect, ends up fixing #234. technically, the rasterizer was going out of bounds, which, under certain circumstances, caused interpolation to shit itself and generate Z values that were out of range (but still ended up in the zbuffer). sometimes those values ended up negative, which caused these glitches when polygons had to be drawn over those. about fucking time.
This commit is contained in:
12
src/CP15.cpp
12
src/CP15.cpp
@ -316,4 +316,16 @@ bool HandleDataWrite32(u32 addr, u32 val, u32 forceuser)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetCodeMemRegion(u32 addr, NDS::MemRegion* region)
|
||||
{
|
||||
if (addr < ITCMSize)
|
||||
{
|
||||
region->Mem = ITCM;
|
||||
region->Mask = 0x7FFF;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user