Trace Viewer: Display texture info even if the demand failed
Display format name as well
This commit is contained in:
parent
57ffee0d8c
commit
e758e87587
|
@ -673,20 +673,21 @@ void TraceViewer::DrawTextureInfo(
|
|||
return;
|
||||
}
|
||||
auto texture = GetTextureEntry(texture_info, sampler_info);
|
||||
if (!texture) {
|
||||
DrawFailedTextureInfo(texture_binding, "Failed to demand texture");
|
||||
return;
|
||||
}
|
||||
|
||||
ImGui::Columns(2);
|
||||
ImVec2 button_size(256, 256);
|
||||
if (ImGui::ImageButton(ImTextureID(texture), button_size, ImVec2(0, 0),
|
||||
ImVec2(1, 1))) {
|
||||
// show viewer
|
||||
if (texture) {
|
||||
ImVec2 button_size(256, 256);
|
||||
if (ImGui::ImageButton(ImTextureID(texture), button_size, ImVec2(0, 0),
|
||||
ImVec2(1, 1))) {
|
||||
// show viewer
|
||||
}
|
||||
} else {
|
||||
DrawFailedTextureInfo(texture_binding, "Failed to demand texture");
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text("Fetch Slot: %u", texture_binding.fetch_constant);
|
||||
ImGui::Text("Guest Address: %.8X", texture_info.guest_address);
|
||||
ImGui::Text("Format: %s", texture_info.format_info()->name);
|
||||
switch (texture_info.dimension) {
|
||||
case Dimension::k1D:
|
||||
ImGui::Text("1D: %dpx", texture_info.width + 1);
|
||||
|
|
Loading…
Reference in New Issue