aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-11-19 22:21:11 -0500
committerGitHub <noreply@github.com>2016-11-19 22:21:11 -0500
commit8582c4351027113ab30fde8c1a57e5bd72128867 (patch)
tree1f25c2dfc1ecb85244fcb7260cbd36b2a5d33fdd /src/video_core/command_processor.cpp
parent98e23c3ba834cdd1dae53c26ef8a14db3137c5b1 (diff)
parent9ee95ffbecd35480f22581bbac6598576dbd8875 (diff)
Merge pull request #2195 from Subv/factor_check
GPU/CiTrace: Avoid calling GetTextures() when not necessary.
Diffstat (limited to 'src/video_core/command_processor.cpp')
-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 fda91e29c4..45585fe309 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) {
PrimitiveAssembler<Shader::OutputVertex>& primitive_assembler = g_state.primitive_assembler;
- if (g_debug_context) {
+ if (g_debug_context && g_debug_context->recorder) {
for (int i = 0; i < 3; ++i) {
const auto texture = regs.GetTextures()[i];
if (!texture.enabled)
continue;
u8* texture_data = Memory::GetPhysicalPointer(texture.config.GetPhysicalAddress());
- if (g_debug_context && Pica::g_debug_context->recorder)
- g_debug_context->recorder->MemoryAccessed(
- texture_data, Pica::Regs::NibblesPerPixel(texture.format) *
- texture.config.width / 2 * texture.config.height,
- texture.config.GetPhysicalAddress());
+ g_debug_context->recorder->MemoryAccessed(
+ texture_data, Pica::Regs::NibblesPerPixel(texture.format) *
+ texture.config.width / 2 * texture.config.height,
+ texture.config.GetPhysicalAddress());
}
}