From 56e506ef9ad7a12eba6c7c9c04eae3d8ce46777d Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:25:49 -0500 Subject: [PATCH] misc cleanup --- src/GPU.cpp | 2 +- src/GPU3D.cpp | 2 +- src/GPU3D_Soft.cpp | 5 ++--- src/GPU3D_Soft.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/GPU.cpp b/src/GPU.cpp index a78deba6..c1f8e2a1 100644 --- a/src/GPU.cpp +++ b/src/GPU.cpp @@ -1043,7 +1043,7 @@ void GPU::StartScanline(u32 line) noexcept } else if (VCount == 183) { - GPU3D.DispCnt |= GPU3D.RDLinesUnderflow << 12; + GPU3D.DispCnt |= GPU3D.RDLinesUnderflow << 12; // CHECKME: does this get set *exactly* at vcount 183? earlier? later? } } diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index a9524e88..17f826fc 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -242,7 +242,7 @@ void GPU3D::Reset() noexcept AlphaRef = 0; RDLines = 63; // defaults to 63 for one frame? (CHECKME: when does it reset?) - RDLinesTemp = 46; + RDLinesTemp = 63; memset(ToonTable, 0, sizeof(ToonTable)); memset(EdgeTable, 0, sizeof(EdgeTable)); diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp index 0600b435..d23a9131 100644 --- a/src/GPU3D_Soft.cpp +++ b/src/GPU3D_Soft.cpp @@ -1843,7 +1843,6 @@ void SoftRenderer::FinishPushScanline(s32 y, s32 pixelsremain) memcpy(&RDBuffer[bufferpos*ScanlineWidth], &ColorBuffer[y*ScanlineWidth], 4 * pixelsremain); } -template void SoftRenderer::RenderPolygons(GPU& gpu, Polygon** polygons, int npolys) { int j = 0; @@ -2015,7 +2014,7 @@ void SoftRenderer::RenderFrame(GPU& gpu) // "Render thread, you're up! Get moving." Platform::Semaphore_Post(Sema_RenderStart); } - else if (!FrameIdentical) RenderPolygons(gpu, &gpu.GPU3D.RenderPolygonRAM[0], gpu.GPU3D.RenderNumPolygons); + else if (!FrameIdentical) RenderPolygons(gpu, &gpu.GPU3D.RenderPolygonRAM[0], gpu.GPU3D.RenderNumPolygons); } void SoftRenderer::RestartFrame(GPU& gpu) @@ -2043,7 +2042,7 @@ void SoftRenderer::RenderThreadFunc(GPU& gpu) { // If no rendering is needed, just say we're done. Platform::Semaphore_Post(Sema_ScanlineCount, 192); } - else RenderPolygons(gpu, &gpu.GPU3D.RenderPolygonRAM[0], gpu.GPU3D.RenderNumPolygons); + else RenderPolygons(gpu, &gpu.GPU3D.RenderPolygonRAM[0], gpu.GPU3D.RenderNumPolygons); // Tell the main thread that we're done rendering // and that it's safe to access the GPU state again. diff --git a/src/GPU3D_Soft.h b/src/GPU3D_Soft.h index 3814762d..c11d6846 100644 --- a/src/GPU3D_Soft.h +++ b/src/GPU3D_Soft.h @@ -478,7 +478,7 @@ private: u16 BeginPushScanline(s32 y, s32 pixelstodraw); void ReadScanline(s32 y); void FinishPushScanline(s32 y, s32 pixelsremain); - template void RenderPolygons(GPU& gpu, Polygon** polygons, int npolys); + void RenderPolygons(GPU& gpu, Polygon** polygons, int npolys); void RenderThreadFunc(GPU& gpu);