diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp index 89bd84bc..98101184 100644 --- a/src/GPU3D_Soft.cpp +++ b/src/GPU3D_Soft.cpp @@ -1870,7 +1870,7 @@ void SoftRenderer::RenderPolygons(GPU& gpu, bool threaded, Polygon** polygons, i if (gpu.GPU3D.RDLines > buffersize) gpu.GPU3D.RDLines = buffersize; } - for (s32 y = 1; y < 192; y++) + if (prevbufferline >= 0) { ScanlineFinalPass(gpu.GPU3D, y-2, prevbufferline, true, prev2dtime); ScanlineFinalPass(gpu.GPU3D, y-1, prevbufferline+1, false, prev2dtime); @@ -1880,7 +1880,7 @@ void SoftRenderer::RenderPolygons(GPU& gpu, bool threaded, Polygon** polygons, i prevbufferline = bufferline; prev2dtime = gpu2dtracking; - if (threaded) + if (threaded) Platform::Semaphore_Post(Sema_ScanlineCount); } diff --git a/src/GPU3D_Soft.h b/src/GPU3D_Soft.h index 7f062cf1..ac3d8e72 100644 --- a/src/GPU3D_Soft.h +++ b/src/GPU3D_Soft.h @@ -490,15 +490,13 @@ private: static constexpr int ScanlineWidth = 256; static constexpr int NumScanlines = 192; static constexpr int NumScanlinesRD = 48; - static constexpr int NumScanlinesInternal = 192; - static constexpr int InternalBufferSize = ScanlineWidth * NumScanlinesInternal; static constexpr int RDBufferSize = ScanlineWidth * NumScanlinesRD; static constexpr int BufferSize = ScanlineWidth * NumScanlines; static constexpr int FirstPixelOffset = 0; - u32 ColorBuffer[InternalBufferSize * 2]; - u32 DepthBuffer[InternalBufferSize * 2]; - u32 AttrBuffer[InternalBufferSize * 2]; + u32 ColorBuffer[BufferSize * 2]; + u32 DepthBuffer[BufferSize * 2]; + u32 AttrBuffer[BufferSize * 2]; u32 RDBuffer[RDBufferSize]; u32 FinalBuffer[BufferSize];