-->

Vulkan: Why does the 1080 Ti have a maxMemoryAlloc

2019-09-21 16:37发布

问题:

I am currently building a game engine in C++ which uses vulkan for rendering. While implementing a terrain renderer I reached a hardware limit, the maxMemoryAllocationCount which limits the amount of allocated memory blocks. I checked https://vulkan.gpuinfo.org/ to see how high that value on different GPUs is. When looking at the "GeForce GTX 1080 Ti", the value is 4096 for windows but 4294967296 for arch/manjaro. Why is there a difference between those OSes, when this really should be a hardware limitation?

回答1:

Why "should" it be a hardware limitation?

With 4 exceptions, every Windows implementation is limited to 4096 allocations. And those exceptions are either open-source RADV hacked to run on Windows or early drivers that returned bogus values.

So clearly, Windows as an OS is imposing this limitation. After all, the OS owns the GPU and must be involved in any memory allocations.

It is the right of the OS to prevent a process from engaging in pathological behavior. Windows seems to think that making lots of GPU allocations is pathological, so the WDDM model imposes a low-but-reasonable limit on GPU allocations.



标签: c++ gpu vulkan