From 5184ad9d8bf315f959e09e4639a95f071019f29b Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 28 Sep 2019 00:36:30 +1000 Subject: [PATCH] GPU: Fix line rendering with larger coordinates --- src/pse/gpu_hw.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pse/gpu_hw.cpp b/src/pse/gpu_hw.cpp index f25607dce..5a58adfb0 100644 --- a/src/pse/gpu_hw.cpp +++ b/src/pse/gpu_hw.cpp @@ -119,15 +119,10 @@ void GPU_HW::LoadVertices(RenderCommand rc, u32 num_vertices) u32 buffer_pos = 1; for (u32 i = 0; i < num_vertices; i++) { - // x/y are encoded differently for lines - 16 bits each const u32 color = (shaded && i > 0) ? (m_GP0_command[buffer_pos++] & UINT32_C(0x00FFFFFF)) : first_color; - const s32 x = Truncate16(m_GP0_command[buffer_pos]); - const s32 y = Truncate16(m_GP0_command[buffer_pos++] >> 16); - m_batch.vertices.push_back(HWVertex{x, y, color}); + const VertexPosition vp{m_GP0_command[buffer_pos++]}; + m_batch.vertices.push_back(HWVertex{vp.x(), vp.y(), color}); } - - FlushRender(); - UpdateDisplay(); } break;