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