Hacker News new | ask | show | jobs
by LoSboccacc 3814 days ago
shader is a program executed by the gpu and can manipulate the memory, driver can create a fake surface out the freed memory and run the shader on it (which would avoid the need of zeroing the memory from the cpu trough the pcie)
1 comments

Well, this is the whole point - how driver knows which memory is freed and how driver runs a shader by itself?
when you do a release on a texture object, when the context is destroyed, when the glDeleteTextures is called.. you just have to enumerate it all, but eventually all functions are passed to the graphic drivers to be translated into gpu operations.
It's as same as saying that a HDD driver can zero deleted files and delete temporary files when a process is killed because it translates API calls into HDD controller commands.
The comparison is apt because it would be exactly like the TRIM operation, retrofitted into the protocol for supporting drivers.
So, in your opinion the driver issues TRIM, not the OS? Then it would be possible to get it on, say, Vista with a driver update, would not it?
Yes, the idea is that the manufacturer is in the position of knowing the most efficient way to talk to it's gpu and the driver knows everything it's happening memory wise. It'd be interesting to have a prototype done in some open source linux driver. Tbh, I'm probably not good enough for that.