Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In theory for a long time you've been able to "persistently map" A GPU side buffer that houses things like indexes, vertex data, or even textures, and then write directly* into GPU memory from the CPU without a staging buffer. This was referred to as 'AZDO' (Approaching Zero Driver Overhead) in the OpenGL space and eventually fed into the design of Vulkan and Direct3D 12 (see https://www.gdcvault.com/play/1020791/Approaching-Zero-Drive... if you're curious about all of this)

I say in theory and used an asterisk because I think it's generally the case that the driver could lie and just maintain an illusion for you by flushing a staging buffer at the 'right time'. But in practice my understanding is that the memory writes will go straight over the PCIe bus to the GPU and into its memory, perhaps with a bit of write-caching/write-combining locally on the CPU. It would be wise to make sure you never read from that mapped memory :)



AZDO is general term for techniques that reduce driver overhead, not limited to persistent mapping.

OpenGL drivers have a habit to try to second-guess the application (though this depends on the driver, eg. Nvidia guesses a lot, Mesa not so much), but passing/not-passing GL_CLIENT_STORAGE_BIT to glBufferStorage should decide whether buffer should reside in CPU/GPU side memory.

In D3D11 directly mapped GPU memory is known as D3D11_USAGE_DYNAMIC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: