Skip to content

Tracking Device Memory Usage and Budget #764

Open
@Erfan-Ahmadi

Description

@Erfan-Ahmadi

Basically what VK_EXT_memory_budget provides.
reports the current usage and budget on each memory heap.
This extension is not supported good enough for it to be in core Nabla [1].

  1. we can emulate the "usage" by tracking our allocates and frees. (using atomics per device)

The VkPhysicalDeviceMemoryBudgetPropertiesEXT::heapUsage will display the current process estimated heap usage.

  1. We can emulate "budget" heuristically, by returning 80% of total heap size. (like VMA)

The VkPhysicalDeviceMemoryBudgetPropertiesEXT::heapBudget values can be used as a guideline for how much total memory from each heap the current process can use at any given time, before allocations may start failing or causing performance degradation. The values may change based on other activity in the system that is outside the scope and control of the Vulkan implementation.

another option is to not return this at all unless the extension is available and log error and return invalid value?

The extension returns those values per "process" but I don't think we can only track per device.

I would like more feedback on this.
maybe it's just better not to use this extension at all and just track usage per device.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions