Microsoft is excited to announce the launch of DirectStorage SDK version 1.2, which comes with new features and updates based on user feedback.
You can find the complete list of changes on the NuGet page, and update to the latest version using NuGet update. For additional information on getting started, visit the DirectStorage homepage. If you have questions or feedback, don't hesitate to join the conversation on the D3D12 Discord Server in the #directstorage channel.
Buffered IO Support
While DirectStorage currently opens files in unbuffered mode to minimize unnecessary copying and quickly transfer data to the GPU, we have received requests from developers for compatibility with both high-speed SSDs and legacy hard drives. To address this need, we have introduced the option to configure DirectStorage to open files in buffered mode, which benefits legacy hard drives by masking long seek times.
To enable this feature, set the "ForceFileBuffering" field in DSTORAGE_CONFIGURATION1 to TRUE. Keep in mind that buffered IO is not compatible with BypassIO, so DisableBypassIO must also be set to TRUE when using this option. It is up to the title to determine when to utilize this setting, which should only be enabled for slower HDD drives that can take advantage of the OS file buffering features.
Introducing GetCompressionSupport API DirectStorage currently selects the decompression path for built-in compression formats based on GPU capabilities, sometimes resulting in a CPU-based fallback path. Developers have expressed a desire to know which decompression path is in use, allowing them to adjust default texture resolution settings accordingly. To accommodate this, we have introduced a new API to query the chosen path.
IDStorageQueue2::GetCompressionSupport() returns a value indicating the decompression path—whether it is GPU-optimized, GPU fallback, or CPU fallback—as well as the types of queues DirectStorage will utilize for decompression.
Bug Fixes and Performance Enhancements
- Resolved issue https://github.com/microsoft/DirectStorage/issues/22 by adding a "Reserved1" field to DSTORAGE_REQUEST_OPTIONS. This clarifies the in-memory structure layout without altering it from previous versions.
- Addressed an issue with DSTORAGE_REQUEST_DESTINATION_TEXTURE_REGION for 3D textures, as reported on the DirectX Discord channel.
- Rectified a scheduling issue occurring during the transfer of uncompressed data from memory to buffers.
- Improved performance by moving the copy process after GPU decompression onto the compute queue for GPUs where this is faster.