mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 13:24:20 +01:00
[hud] Use different colors to highlight mapped or non-mapped allocations
Useful on UMA systems or when we have to fall back to system memory.
This commit is contained in:
parent
d00ca261af
commit
5c8728abd2
@ -613,6 +613,7 @@ namespace dxvk {
|
|||||||
chunkStats.used = pool.pageAllocator.pagesUsed(i) * DxvkPageAllocator::PageSize;
|
chunkStats.used = pool.pageAllocator.pagesUsed(i) * DxvkPageAllocator::PageSize;
|
||||||
chunkStats.pageMaskOffset = stats.pageMasks.size();
|
chunkStats.pageMaskOffset = stats.pageMasks.size();
|
||||||
chunkStats.pageCount = pool.pageAllocator.pageCount(i);
|
chunkStats.pageCount = pool.pageAllocator.pageCount(i);
|
||||||
|
chunkStats.mapped = &pool == &type.mappedPool;
|
||||||
|
|
||||||
size_t maskCount = (chunkStats.pageCount + 31u) / 32u;
|
size_t maskCount = (chunkStats.pageCount + 31u) / 32u;
|
||||||
stats.pageMasks.resize(chunkStats.pageMaskOffset + maskCount);
|
stats.pageMasks.resize(chunkStats.pageMaskOffset + maskCount);
|
||||||
|
@ -173,9 +173,11 @@ namespace dxvk {
|
|||||||
VkDeviceSize used = 0u;
|
VkDeviceSize used = 0u;
|
||||||
/// Index of first page mask belonging to this
|
/// Index of first page mask belonging to this
|
||||||
/// chunk in the page mask array
|
/// chunk in the page mask array
|
||||||
size_t pageMaskOffset = 0u;
|
uint32_t pageMaskOffset = 0u;
|
||||||
/// Number of pages in this chunk.
|
/// Number of pages in this chunk.
|
||||||
size_t pageCount = 0u;
|
uint16_t pageCount = 0u;
|
||||||
|
/// Whether this chunk is mapped
|
||||||
|
bool mapped = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -825,13 +825,13 @@ namespace dxvk::hud {
|
|||||||
args.size = size;
|
args.size = size;
|
||||||
|
|
||||||
if (!(memoryType.propertyFlags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT)) {
|
if (!(memoryType.propertyFlags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT)) {
|
||||||
if (!(memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT))
|
if (!stats.mapped)
|
||||||
args.color = 0xff202020u;
|
args.color = 0xff202020u;
|
||||||
else if (memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
else if (memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
||||||
args.color = 0xff208020u;
|
args.color = 0xff208020u;
|
||||||
else
|
else
|
||||||
args.color = 0xff202080u;
|
args.color = 0xff202080u;
|
||||||
} else if (memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
|
} else if (stats.mapped) {
|
||||||
args.color = 0xff208080u;
|
args.color = 0xff208080u;
|
||||||
} else {
|
} else {
|
||||||
args.color = 0xff804020u;
|
args.color = 0xff804020u;
|
||||||
|
Loading…
Reference in New Issue
Block a user