From 7edfdd2cdd4ba1593af7ce7315fde0a96e3dcb2c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 30 Oct 2021 21:03:01 -0700 Subject: [PATCH] GPU: Rename pos/uv w for clarity. --- GPU/Common/SoftwareTransformCommon.cpp | 2 +- GPU/GPUCommon.cpp | 4 ++-- GPU/GPUCommon.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index a24414ce5e..49c9b122ff 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -213,7 +213,7 @@ void SoftwareTransform::Decode(int prim, u32 vertType, const DecVtxFormat &decVt // TODO: Write to a flexible buffer, we don't always need all four components. TransformedVertex &vert = transformed[index]; reader.ReadPos(vert.pos); - vert.posw = 1.0f; + vert.pos_w = 1.0f; if (reader.hasColor0()) { if (provokeIndOffset != 0 && index + provokeIndOffset < maxIndex) { diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 124c924bfe..a33f1621f4 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2259,10 +2259,10 @@ void GPUCommon::Execute_ImmVertexAlphaPrim(u32 op, u32 diff) { v.x = ((gstate.imm_vscx & 0xFFFFFF) - offsetX) / 16.0f; v.y = ((gstate.imm_vscy & 0xFFFFFF) - offsetY) / 16.0f; v.z = gstate.imm_vscz & 0xFFFF; - v.posw = 1.0f; + v.pos_w = 1.0f; v.u = getFloat24(gstate.imm_vtcs); v.v = getFloat24(gstate.imm_vtct); - v.w = getFloat24(gstate.imm_vtcq); + v.uv_w = getFloat24(gstate.imm_vtcq); v.color0_32 = (gstate.imm_cv & 0xFFFFFF) | (gstate.imm_ap << 24); v.fog = 0.0f; // we have no information about the scale here v.color1_32 = gstate.imm_scv & 0xFFFFFF; diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 3fd57d7f9d..b9d49f1471 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -43,13 +43,13 @@ enum { struct TransformedVertex { union { struct { - float x, y, z, posw; // in case of morph, preblend during decode + float x, y, z, pos_w; // in case of morph, preblend during decode }; float pos[4]; }; union { struct { - float u; float v; float w; // scaled by uscale, vscale, if there + float u; float v; float uv_w; // scaled by uscale, vscale, if there }; float uv[3]; };