summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2016-11-19 22:21:11 -0500
committerGravatar GitHub2016-11-19 22:21:11 -0500
commit2de470c9b26f709859b2d842e60a2303784b3cb0 (patch)
tree1f25c2dfc1ecb85244fcb7260cbd36b2a5d33fdd /src
parentMerge pull request #2193 from Subv/pulse_events (diff)
parentGPU/CiTrace: Avoid calling GetTextures() when not necessary. (diff)
downloadyuzu-2de470c9b26f709859b2d842e60a2303784b3cb0.tar.gz
yuzu-2de470c9b26f709859b2d842e60a2303784b3cb0.tar.xz
yuzu-2de470c9b26f709859b2d842e60a2303784b3cb0.zip
Merge pull request #2195 from Subv/factor_check
GPU/CiTrace: Avoid calling GetTextures() when not necessary.
Diffstat (limited to '')
-rw-r--r--src/video_core/command_processor.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index fda91e29c..45585fe30 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -215,18 +215,17 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
215 215
216 PrimitiveAssembler<Shader::OutputVertex>& primitive_assembler = g_state.primitive_assembler; 216 PrimitiveAssembler<Shader::OutputVertex>& primitive_assembler = g_state.primitive_assembler;
217 217
218 if (g_debug_context) { 218 if (g_debug_context && g_debug_context->recorder) {
219 for (int i = 0; i < 3; ++i) { 219 for (int i = 0; i < 3; ++i) {
220 const auto texture = regs.GetTextures()[i]; 220 const auto texture = regs.GetTextures()[i];
221 if (!texture.enabled) 221 if (!texture.enabled)
222 continue; 222 continue;
223 223
224 u8* texture_data = Memory::GetPhysicalPointer(texture.config.GetPhysicalAddress()); 224 u8* texture_data = Memory::GetPhysicalPointer(texture.config.GetPhysicalAddress());
225 if (g_debug_context && Pica::g_debug_context->recorder) 225 g_debug_context->recorder->MemoryAccessed(
226 g_debug_context->recorder->MemoryAccessed( 226 texture_data, Pica::Regs::NibblesPerPixel(texture.format) *
227 texture_data, Pica::Regs::NibblesPerPixel(texture.format) * 227 texture.config.width / 2 * texture.config.height,
228 texture.config.width / 2 * texture.config.height, 228 texture.config.GetPhysicalAddress());
229 texture.config.GetPhysicalAddress());
230 } 229 }
231 } 230 }
232 231