Open cwfitzgerald opened 2 years ago
FWIW, GL has GL_NVX_gpu_memory_info which seems to be supported okay-ish (~50% of reports on gpuinfo).
GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX
would then be maximum/"expected" memory size, and GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
would be the actual available value.
I'm not positive if that will show up as we use GLES, but if it does we totally should. Thanks for the pointer!
Is your feature request related to a problem? Please describe.
Users often need to know how much memory they can actually use to make good use of the data they have, without needing to do it on a reactionary basis.
Describe the solution you'd like
Add an api that dispatches to the following apis:
IDXGIAdapter3::QueryVideoMemoryInfo
VK_EXT_memory_budget
We can also, barring information about real memory usage, expose the "expected heap sizes" which are:
DXGI_ADAPTER_DESC2::DedicatedVideoMemory
`.I think we should just expose both if we can with a simple
Describe alternatives you've considered
Not providing this information. It works in a pinch, but in practice, this isn't great as applications that need to store datasets well above what memory supports needs some way to understand the current memory pressure.
Additional context
https://github.com/BVE-Reborn/rend3/issues/348