1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-01 08:52:11 +01:00

[hud] Fix off-by-one error in memory type enumeration

This commit is contained in:
Philip Rebohle 2024-10-31 12:02:58 +01:00
parent a91afc3a2f
commit 65aa74aa7f

View File

@ -1096,7 +1096,7 @@ namespace dxvk::hud {
} }
// Render descriptive text // Render descriptive text
std::string headline = str::format("Mem type ", i, " [", type.properties.heapIndex, "]: ", std::string headline = str::format("Mem type ", (i - 1), " [", type.properties.heapIndex, "]: ",
type.chunkCount, " chunk", type.chunkCount != 1u ? "s" : "", " (", (stats.memoryAllocated >> 20u), " MB, ", type.chunkCount, " chunk", type.chunkCount != 1u ? "s" : "", " (", (stats.memoryAllocated >> 20u), " MB, ",
((stats.memoryUsed >= (1u << 20u)) ? stats.memoryUsed >> 20 : stats.memoryUsed >> 10), ((stats.memoryUsed >= (1u << 20u)) ? stats.memoryUsed >> 20 : stats.memoryUsed >> 10),
(stats.memoryUsed >= (1u << 20u) ? " MB" : " kB"), " used)"); (stats.memoryUsed >= (1u << 20u) ? " MB" : " kB"), " used)");