From 79dc835378bae5ffddfdd3ddb41c3fab4436402e Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sun, 21 Feb 2016 18:56:56 +0100 Subject: [PATCH] rsx/common: Track transform constant update. --- rpcs3/Emu/RSX/RSXThread.cpp | 1 + rpcs3/Emu/RSX/RSXThread.h | 1 + rpcs3/Emu/RSX/rsx_methods.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 8b98ea23bb..237f124bad 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -280,6 +280,7 @@ namespace rsx }; m_rtts_dirty = true; memset(m_textures_dirty, -1, sizeof(m_textures_dirty)); + m_transform_constants_dirty = true; } thread::~thread() diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 6904bbc07d..14fb2aeba8 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -289,6 +289,7 @@ namespace rsx std::vector inline_vertex_array; bool m_rtts_dirty; + bool m_transform_constants_dirty; bool m_textures_dirty[16]; protected: std::array get_color_surface_addresses() const; diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index cb7d42d845..b86f15c71b 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -197,6 +197,7 @@ namespace rsx size_t subreg = index % 4; memcpy(rsxthr->transform_constants[load + reg].rgba + subreg, method_registers + NV4097_SET_TRANSFORM_CONSTANT + reg * count + subreg, sizeof(f32)); + rsxthr->m_transform_constants_dirty = true; } };