mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
graphics_cmdlists: Get rid of variable shadowing
This commit is contained in:
parent
1e5644935d
commit
4e7092881f
@ -124,19 +124,21 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
|
|||||||
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
|
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
|
||||||
COMMAND_IN_RANGE(command_id, texture2)) {
|
COMMAND_IN_RANGE(command_id, texture2)) {
|
||||||
|
|
||||||
unsigned index;
|
unsigned texture_index;
|
||||||
if (COMMAND_IN_RANGE(command_id, texture0)) {
|
if (COMMAND_IN_RANGE(command_id, texture0)) {
|
||||||
index = 0;
|
texture_index = 0;
|
||||||
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
|
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
|
||||||
index = 1;
|
texture_index = 1;
|
||||||
} else if (COMMAND_IN_RANGE(command_id, texture2)) {
|
} else if (COMMAND_IN_RANGE(command_id, texture2)) {
|
||||||
index = 2;
|
texture_index = 2;
|
||||||
} else {
|
} else {
|
||||||
UNREACHABLE_MSG("Unknown texture command");
|
UNREACHABLE_MSG("Unknown texture command");
|
||||||
}
|
}
|
||||||
auto config = Pica::g_state.regs.GetTextures()[index].config;
|
|
||||||
auto format = Pica::g_state.regs.GetTextures()[index].format;
|
const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
|
||||||
auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
|
const auto config = texture.config;
|
||||||
|
const auto format = texture.format;
|
||||||
|
const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
|
||||||
|
|
||||||
// TODO: Open a surface debugger
|
// TODO: Open a surface debugger
|
||||||
}
|
}
|
||||||
@ -150,18 +152,20 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
|
|||||||
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
|
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
|
||||||
COMMAND_IN_RANGE(command_id, texture2)) {
|
COMMAND_IN_RANGE(command_id, texture2)) {
|
||||||
|
|
||||||
unsigned index;
|
unsigned texture_index;
|
||||||
if (COMMAND_IN_RANGE(command_id, texture0)) {
|
if (COMMAND_IN_RANGE(command_id, texture0)) {
|
||||||
index = 0;
|
texture_index = 0;
|
||||||
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
|
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
|
||||||
index = 1;
|
texture_index = 1;
|
||||||
} else {
|
} else {
|
||||||
index = 2;
|
texture_index = 2;
|
||||||
}
|
}
|
||||||
auto config = Pica::g_state.regs.GetTextures()[index].config;
|
|
||||||
auto format = Pica::g_state.regs.GetTextures()[index].format;
|
|
||||||
|
|
||||||
auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
|
const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
|
||||||
|
const auto config = texture.config;
|
||||||
|
const auto format = texture.format;
|
||||||
|
|
||||||
|
const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
|
||||||
const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress());
|
const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress());
|
||||||
new_info_widget = new TextureInfoWidget(src, info);
|
new_info_widget = new TextureInfoWidget(src, info);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user