问题
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.
来源:https://stackoverflow.com/questions/47313319/vulkan-why-does-the-1080-ti-have-a-maxmemoryallocationcount-of-4294967296-on-ar