mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-22 19:44:04 +00:00
Merge pull request #2195 from Subv/factor_check
GPU/CiTrace: Avoid calling GetTextures() when not necessary.
This commit is contained in:
commit
2de470c9b2
1 changed files with 5 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue