The latest version of DirectStorage API is now available from Microsoft. Version 1.2 comes with new features and bug fixes, as well as improved performance due to some modifications.
One of the new features in DirectStorage 1.2 is buffered IO mode. Microsoft says this feature was requested by developers who wanted to use the same code path for both SSDs and HDDs. HDDs need buffered IO mode because they have much longer seek times.
“DirectStorage currently opens files in unbuffered mode. This allows us to avoid unnecessary copies, getting the data onto the GPU as quickly as possible. However, we heard from some developers that they'd like to be able to use the same code both on high-speed SSDs as well as legacy hard drives. The legacy hard drives require buffered IO in order to mask the long seek times. For this reason, we added the ability to configure DirectStorage to open files in buffered mode.”
Another new feature is the GetCompressionSupport API, which allows querying the decompression path used, whether it is the GPU or the CPU fallback path.
Full Changelog for DirectStorage Version 1.2
“New Features
- Add support for enabling buffered file IO for use on HDDs that may benefit from OS file caching behaviors.
- Add IDStorageQueue2::GetCompressionSupport API to indicate what path the DirectStorage runtime will take when decompressing a supported GPU decompression format.
- Update dstorage.h and dstorageerr.h to be covered by the MIT License.
- Add Microsoft.Direct3D.DirectStorage.winmd, to ease generation of non-C++ bindings to the API.
Bug Fixes
- Add “Reserved1” field to DSTORAGE_REQUEST_OPTIONS. This makes the in-memory layout of the structure more explicit, but doesn't actually change the layout from previous versions.
- Fix DSTORAGE_REQUEST_DESTINATION_TEXTURE_REGION for 3D textures.
- Fix scheduling issue that manifested when transferring uncompressed data from memory to buffers
Performance improvements
- Move the copy after GPU decompression onto the compute queue for GPUs where this is faster.”
Part of the company's Xbox Velocity Architecture, the DirectStorage API provides specific features to enhance gaming. This week, the first game demo using DirectStorage has been shared.
In a previous blog post, Microsoft describes the API as the following:
This public SDK release begins a new era of fast load times and detailed worlds in PC games by allowing developers to more fully utilize the speed of the latest storage devices. In September 2020, we announced DirectStorage would be coming to Windows, and after collecting feedback throughout our developer preview, we are making this API available to all of our partners to ship with their games.”
Tip of the day: If you need to Create, Delete or Resize Partitions, Windows has everything you thanks to the built-in Disk Management-tool.