Vulkan: Why does the 1080 Ti have a maxMemoryAllocationCount of 4294967296 on arch but only 4096 on Windows?

北城以北 提交于 2019-12-13 11:06:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!