mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Add method to retrieve per-heap memory stats
This commit is contained in:
parent
4fcf28f4dc
commit
8e587af0da
@ -175,6 +175,11 @@ namespace dxvk {
|
||||
result.merge(m_statCounters);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
DxvkMemoryStats DxvkDevice::getMemoryStats(uint32_t heap) {
|
||||
return m_objects.memoryManager().getMemoryStats(heap);
|
||||
}
|
||||
|
||||
|
||||
uint32_t DxvkDevice::getCurrentFrameId() const {
|
||||
|
@ -350,6 +350,14 @@ namespace dxvk {
|
||||
*/
|
||||
DxvkStatCounters getStatCounters();
|
||||
|
||||
/**
|
||||
* \brief Retrieves memors statistics
|
||||
*
|
||||
* \param [in] heap Memory heap index
|
||||
* \returns Memory stats for this heap
|
||||
*/
|
||||
DxvkMemoryStats getMemoryStats(uint32_t heap);
|
||||
|
||||
/**
|
||||
* \brief Retreves current frame ID
|
||||
* \returns Current frame ID
|
||||
|
@ -271,6 +271,18 @@ namespace dxvk {
|
||||
*/
|
||||
DxvkMemoryStats getMemoryStats();
|
||||
|
||||
/**
|
||||
* \brief Queries memory stats
|
||||
*
|
||||
* Returns the total amount of memory
|
||||
* allocated and used for a given heap.
|
||||
* \param [in] heap Heap index
|
||||
* \returns Memory stats for this heap
|
||||
*/
|
||||
DxvkMemoryStats getMemoryStats(uint32_t heap) const {
|
||||
return m_memHeaps[heap].stats;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
const Rc<vk::DeviceFn> m_vkd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user