RADV Vulkan Driver Adds Option For Zeroing Out Video Memory
New to Mesa 20.1-devel is a new option for the Radeon Vulkan "RADV" driver to enable zeroing out video memory allocations.
This isn't a new concept with other graphics drivers offering similar functionality for zeroing out the vRAM either for security reasons or working around pesky game/app issues. For example, RadeonSI OpenGL zeros out the vRAM for Rocket League to workaround buggy behavior with that game. But zeroing out the video memory normally isn't done by default for all allocations due to performance reasons.
With the new flag to zero vRAM allocations for the RADV Vulkan driver it was done by Valve's Samuel Pitoiset. In this case he mentions it's in part for "future work."
Besides adding the flag to enable zero vRAM allocations, RADV is setting it by default when creating trace buffer objects. Trace BOs are used when under RADV_TRACE_FILE behavior for collecting a Vulkan driver trace. Zeroing out the vRAM in this context is likely being done to ensure nothing is mucking up the data being collected for analyze the traces. We'll see what else Valve ends up using this new flag for, which among other possibilities could end up also being tied into their distributed shader cache collection efforts.
This isn't a new concept with other graphics drivers offering similar functionality for zeroing out the vRAM either for security reasons or working around pesky game/app issues. For example, RadeonSI OpenGL zeros out the vRAM for Rocket League to workaround buggy behavior with that game. But zeroing out the video memory normally isn't done by default for all allocations due to performance reasons.
With the new flag to zero vRAM allocations for the RADV Vulkan driver it was done by Valve's Samuel Pitoiset. In this case he mentions it's in part for "future work."
Besides adding the flag to enable zero vRAM allocations, RADV is setting it by default when creating trace buffer objects. Trace BOs are used when under RADV_TRACE_FILE behavior for collecting a Vulkan driver trace. Zeroing out the vRAM in this context is likely being done to ensure nothing is mucking up the data being collected for analyze the traces. We'll see what else Valve ends up using this new flag for, which among other possibilities could end up also being tied into their distributed shader cache collection efforts.
12 Comments