mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
ImGeDebugger: In the textures window, properly write out the status flags.
This commit is contained in:
1 parent
7f53eeff08
commit
6919d8a764
3 files changed
+58
-1
No files matched your search
@@ -3102,3 +3102,58 @@ CheckAlphaResult TextureCacheCommon::CheckCLUTAlpha(const uint8_t *pixelData, GE
|
||||
return CheckAlpha32((const u32 *)pixelData, w, 0xFF000000);
|
||||
}
|
||||
}
|
||||
|
||||
std::string TexStatusToString(TexCacheEntry::TexStatus status) {
|
||||
std::string result;
|
||||
switch (status & TexCacheEntry::STATUS_MASK) {
|
||||
case TexCacheEntry::STATUS_HASHING:
|
||||
result += "HASHING ";
|
||||
break;
|
||||
case TexCacheEntry::STATUS_RELIABLE:
|
||||
result += "RELIABLE ";
|
||||
break;
|
||||
case TexCacheEntry::STATUS_UNRELIABLE:
|
||||
result += "UNRELIABLE ";
|
||||
break;
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_ALPHA_MASK) {
|
||||
result += "ALPHA";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_CLUT_VARIANTS) {
|
||||
result += "CLUTVARIANTS ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_CLUT_RECHECK) {
|
||||
result += "CLUT_RECHECK ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_CHANGE_FREQUENT) {
|
||||
result += "FREQ ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_UNRELIABLE) {
|
||||
result += "UNREL ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_TO_SCALE) {
|
||||
result += "TOSCALE ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_IS_SCALED_OR_REPLACED) {
|
||||
result += "SCALED/REPL ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_NO_MIPS) {
|
||||
result += "NO_MIPS ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_CLUT_GPU) {
|
||||
result += "CLUT_GPU ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_FORCE_REBUILD) {
|
||||
result += "FORCE_REBUILD ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_3D) {
|
||||
result += "3D ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_VIDEO) {
|
||||
result += "VIDEO ";
|
||||
}
|
||||
if (status & TexCacheEntry::STATUS_BGRA) {
|
||||
result += "BGRA ";
|
||||
}
|
||||
return result.empty() ? "None" : result;
|
||||
}
|
||||
@@ -237,6 +237,8 @@ struct TexCacheEntry {
|
||||
static u64 CacheKey(u32 addr, u8 format, u16 dim, u32 cluthash);
|
||||
};
|
||||
|
||||
std::string TexStatusToString(TexCacheEntry::TexStatus status);
|
||||
|
||||
// Can't be unordered_map, we use lower_bound ... although for some reason that (used to?) compiles on MSVC.
|
||||
// Would really like to replace this with DenseHashMap but can't as long as we need lower_bound.
|
||||
typedef std::map<u64, std::unique_ptr<TexCacheEntry>> TexCache;
|
||||
|
||||
@@ -174,7 +174,7 @@ void DrawTexturesWindow(ImConfig &cfg, TextureCacheCommon *textureCache) {
|
||||
ImGui::Image(texId, ImVec2(w, h));
|
||||
ImGui::Text("%08x: %dx%d, %d mips, %s", (uint32_t)(cfg.selectedTexAddr & 0xFFFFFFFF), w, h, entry->maxLevel + 1, GeTextureFormatToString((GETextureFormat)entry->format));
|
||||
ImGui::Text("Stride: %d", entry->bufw);
|
||||
ImGui::Text("Status: %08x", entry->status); // TODO: Show the flags
|
||||
ImGui::Text("Status: %08x: %s", entry->status, TexStatusToString((TexCacheEntry::TexStatus)(entry->status)).c_str());
|
||||
ImGui::Text("Hash: %08x", entry->fullhash);
|
||||
ImGui::Text("CLUT Hash: %08x", entry->cluthash);
|
||||
ImGui::Text("Minihash: %08x", entry->minihash);
|
||||
|
||||
Reference in new issue
Block a user