mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	GPU/CiTrace: Avoid calling GetTextures() when not necessary.
This commit is contained in:
		@@ -215,18 +215,17 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        PrimitiveAssembler<Shader::OutputVertex>& primitive_assembler = g_state.primitive_assembler;
 | 
					        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) {
 | 
					            for (int i = 0; i < 3; ++i) {
 | 
				
			||||||
                const auto texture = regs.GetTextures()[i];
 | 
					                const auto texture = regs.GetTextures()[i];
 | 
				
			||||||
                if (!texture.enabled)
 | 
					                if (!texture.enabled)
 | 
				
			||||||
                    continue;
 | 
					                    continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                u8* texture_data = Memory::GetPhysicalPointer(texture.config.GetPhysicalAddress());
 | 
					                u8* texture_data = Memory::GetPhysicalPointer(texture.config.GetPhysicalAddress());
 | 
				
			||||||
                if (g_debug_context && Pica::g_debug_context->recorder)
 | 
					                g_debug_context->recorder->MemoryAccessed(
 | 
				
			||||||
                    g_debug_context->recorder->MemoryAccessed(
 | 
					                    texture_data, Pica::Regs::NibblesPerPixel(texture.format) *
 | 
				
			||||||
                        texture_data, Pica::Regs::NibblesPerPixel(texture.format) *
 | 
					                    texture.config.width / 2 * texture.config.height,
 | 
				
			||||||
                                          texture.config.width / 2 * texture.config.height,
 | 
					                    texture.config.GetPhysicalAddress());
 | 
				
			||||||
                        texture.config.GetPhysicalAddress());
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user