1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 01:24: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 4724dfff86
commit b9af847fcd

View File

@ -1096,7 +1096,7 @@ namespace dxvk::hud {
}
// 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, ",
((stats.memoryUsed >= (1u << 20u)) ? stats.memoryUsed >> 20 : stats.memoryUsed >> 10),
(stats.memoryUsed >= (1u << 20u) ? " MB" : " kB"), " used)");