Currently, when you have a game with say 10k separate asset files, you either place 10k asset files in the file system (which is slow because NTFS) or you develop some sort of your own virtual read-only filesystem on top of that (which has been done for decades too, see e.g. the WAD format created for Doom). And there have been many implementations for these, and yet they suffer from two things: the OS filesystem cache can't know which parts of such a package file (aka the index) are relevant to always keep in memory, and the game has to copy the assets to the GPU.
The general idea, if I get it right, is that DirectStorage provides a standardized layer that:
- cuts down on filesystem-related overhead by providing its own optimized filesystem (e.g. omitting journals because the purpose of the storage is 99.99% read vs write), or even if they don't go that far and use a-blob-on-NTFS at least to cut down on fopen, fclose etc.
- provides a standard way for game developers to deal with the problem "how to package and distribute tons of tiny assets and compressing and decompressing them"
- saves context switches across the road, e.g. as mentioned eliminate fopen and fclose calls or by copying the file contents to the GPU entirely in kernel mode
Nevertheless I'm not sure what outside of copying assets to the GPU in kernel mode actually will be the benefit of DirectStorage as almost everyone these days uses one of the major engines that have all these problems dealt with for ages.
Currently, when you have a game with say 10k separate asset files, you either place 10k asset files in the file system (which is slow because NTFS) or you develop some sort of your own virtual read-only filesystem on top of that (which has been done for decades too, see e.g. the WAD format created for Doom). And there have been many implementations for these, and yet they suffer from two things: the OS filesystem cache can't know which parts of such a package file (aka the index) are relevant to always keep in memory, and the game has to copy the assets to the GPU.
The general idea, if I get it right, is that DirectStorage provides a standardized layer that:
- cuts down on filesystem-related overhead by providing its own optimized filesystem (e.g. omitting journals because the purpose of the storage is 99.99% read vs write), or even if they don't go that far and use a-blob-on-NTFS at least to cut down on fopen, fclose etc.
- provides a standard way for game developers to deal with the problem "how to package and distribute tons of tiny assets and compressing and decompressing them"
- saves context switches across the road, e.g. as mentioned eliminate fopen and fclose calls or by copying the file contents to the GPU entirely in kernel mode
Nevertheless I'm not sure what outside of copying assets to the GPU in kernel mode actually will be the benefit of DirectStorage as almost everyone these days uses one of the major engines that have all these problems dealt with for ages.