summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderX64.cpp
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2024-10-12 19:49:48 +0100
committerGitHub <noreply@github.com>2024-10-12 19:49:48 +0100
commitd43c6dc555fea0b0ec84d05779a62dc876b70bf4 (patch)
treef7e24ca237cdda8cde7e611ee52806fdea96292a /Source/Core/VideoCommon/VertexLoaderX64.cpp
parent35ec2e97a8ea90730cb33eceec701f81597f98f7 (diff)
parent937bb2aa2e12b635ba328af8de7c9a5d5963d084 (diff)
Merge pull request #13074 from Pokechu22/normal-cache
Cache normals in addition to binormals and tangents
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderX64.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index 9934570b55..aa8ad2bd67 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -137,6 +137,14 @@ void VertexLoaderX64::ReadVertex(OpArg data, VertexComponentFormat attribute,
MOVUPS(MPIC(VertexLoaderManager::position_cache.data(), scratch3, SCALE_4), coords);
SetJumpTarget(dont_store);
}
+ else if (native_format == &m_native_vtx_decl.normals[0])
+ {
+ TEST(32, R(remaining_reg), R(remaining_reg));
+ FixupBranch dont_store = J_CC(CC_NZ);
+ // For similar reasons, the cached normal is 4 floats each
+ MOVUPS(MPIC(VertexLoaderManager::normal_cache.data()), coords);
+ SetJumpTarget(dont_store);
+ }
else if (native_format == &m_native_vtx_decl.normals[1])
{
TEST(32, R(remaining_reg), R(remaining_reg));