diff options
| author | 2016-12-10 19:44:01 -0500 | |
|---|---|---|
| committer | 2016-12-11 04:33:24 -0500 | |
| commit | 4e7092881f6655b5ae99db2f0a1e8136199804d0 (patch) | |
| tree | 626b3fa72785b1896606a142f9139d25acacc7ae /src/citra_qt/debugger/graphics_cmdlists.cpp | |
| parent | graphics_cmdlists: Get rid of an unused variable (diff) | |
| download | yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.gz yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.xz yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.zip | |
graphics_cmdlists: Get rid of variable shadowing
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 6958ac347..98b619dea 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -124,19 +124,21 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { | |||
| 124 | if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) || | 124 | if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) || |
| 125 | COMMAND_IN_RANGE(command_id, texture2)) { | 125 | COMMAND_IN_RANGE(command_id, texture2)) { |
| 126 | 126 | ||
| 127 | unsigned index; | 127 | unsigned texture_index; |
| 128 | if (COMMAND_IN_RANGE(command_id, texture0)) { | 128 | if (COMMAND_IN_RANGE(command_id, texture0)) { |
| 129 | index = 0; | 129 | texture_index = 0; |
| 130 | } else if (COMMAND_IN_RANGE(command_id, texture1)) { | 130 | } else if (COMMAND_IN_RANGE(command_id, texture1)) { |
| 131 | index = 1; | 131 | texture_index = 1; |
| 132 | } else if (COMMAND_IN_RANGE(command_id, texture2)) { | 132 | } else if (COMMAND_IN_RANGE(command_id, texture2)) { |
| 133 | index = 2; | 133 | texture_index = 2; |
| 134 | } else { | 134 | } else { |
| 135 | UNREACHABLE_MSG("Unknown texture command"); | 135 | UNREACHABLE_MSG("Unknown texture command"); |
| 136 | } | 136 | } |
| 137 | auto config = Pica::g_state.regs.GetTextures()[index].config; | 137 | |
| 138 | auto format = Pica::g_state.regs.GetTextures()[index].format; | 138 | const auto texture = Pica::g_state.regs.GetTextures()[texture_index]; |
| 139 | auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); | 139 | const auto config = texture.config; |
| 140 | const auto format = texture.format; | ||
| 141 | const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); | ||
| 140 | 142 | ||
| 141 | // TODO: Open a surface debugger | 143 | // TODO: Open a surface debugger |
| 142 | } | 144 | } |
| @@ -150,18 +152,20 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { | |||
| 150 | if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) || | 152 | if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) || |
| 151 | COMMAND_IN_RANGE(command_id, texture2)) { | 153 | COMMAND_IN_RANGE(command_id, texture2)) { |
| 152 | 154 | ||
| 153 | unsigned index; | 155 | unsigned texture_index; |
| 154 | if (COMMAND_IN_RANGE(command_id, texture0)) { | 156 | if (COMMAND_IN_RANGE(command_id, texture0)) { |
| 155 | index = 0; | 157 | texture_index = 0; |
| 156 | } else if (COMMAND_IN_RANGE(command_id, texture1)) { | 158 | } else if (COMMAND_IN_RANGE(command_id, texture1)) { |
| 157 | index = 1; | 159 | texture_index = 1; |
| 158 | } else { | 160 | } else { |
| 159 | index = 2; | 161 | texture_index = 2; |
| 160 | } | 162 | } |
| 161 | auto config = Pica::g_state.regs.GetTextures()[index].config; | ||
| 162 | auto format = Pica::g_state.regs.GetTextures()[index].format; | ||
| 163 | 163 | ||
| 164 | auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); | 164 | const auto texture = Pica::g_state.regs.GetTextures()[texture_index]; |
| 165 | const auto config = texture.config; | ||
| 166 | const auto format = texture.format; | ||
| 167 | |||
| 168 | const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); | ||
| 165 | const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress()); | 169 | const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress()); |
| 166 | new_info_widget = new TextureInfoWidget(src, info); | 170 | new_info_widget = new TextureInfoWidget(src, info); |
| 167 | } | 171 | } |