summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderX64.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-03-29 03:26:46 -0400
committerGitHub <noreply@github.com>2025-03-29 03:26:46 -0400
commit9819d66a478be3d57af9278e6c2cb433556a78d1 (patch)
tree07623114def6822d8abd7c61d77520fe98b391ce /Source/Core/VideoCommon/VertexLoaderX64.cpp
parentf00b7d39f0b2ff6cebbd78125bf7cdc888b9a6af (diff)
parent433c6ce0f20e33379985a56b58540197feeeff59 (diff)
Merge pull request #13221 from mitaclaw/nrvo-fails-1
GCC: Remedy NRVO Fails
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderX64.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index aa8ad2bd67..c7cbf55257 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -57,11 +57,10 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att)
OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attribute)
{
- OpArg data = MDisp(src_reg, m_src_ofs);
if (IsIndexed(attribute))
{
int bits = attribute == VertexComponentFormat::Index8 ? 8 : 16;
- LoadAndSwap(bits, scratch1, data);
+ LoadAndSwap(bits, scratch1, MDisp(src_reg, m_src_ofs));
m_src_ofs += bits / 8;
if (array == CPArray::Position)
{
@@ -74,7 +73,7 @@ OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attrib
}
else
{
- return data;
+ return MDisp(src_reg, m_src_ofs);
}
}