Microsoft.Direct3D.DirectStorage 1.4.0

Prefix Reserved
dotnet add package Microsoft.Direct3D.DirectStorage --version 1.4.0
                    
NuGet\Install-Package Microsoft.Direct3D.DirectStorage -Version 1.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Direct3D.DirectStorage" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Direct3D.DirectStorage" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Direct3D.DirectStorage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Direct3D.DirectStorage --version 1.4.0
                    
#r "nuget: Microsoft.Direct3D.DirectStorage, 1.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Direct3D.DirectStorage@1.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Direct3D.DirectStorage&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Direct3D.DirectStorage&version=1.4.0
                    
Install as a Cake Tool

DirectStorage SDK

This package contains the DirectStorage SDK, including the redistributable binaries.

For help getting started and other information for DirectStorage, please see:

https://aka.ms/DirectStorage

The included licenses apply to the following files:

  • LICENSE.txt : applies to all files under native/bin/
  • LICENSE-CODE.txt : applies to all files under native/include/

Changelog

1.4

New Features

  • Add built-in CPU and GPU decompression support for Zstd through DSTORAGE_COMPRESSION_FORMAT_ZSTD, on queues that declare Zstd with the new CreateQueue1(). DStorageCreateCompressionCodec() also supports Zstd.
  • Add support for Game Asset Conditioning Library (GACL) shuffle transforms for BC1, BC3, BC4, BC5 and BC7 textures, on Zstd queues that declare them with CreateQueue1():
    • New enum: DSTORAGE_GACL_SHUFFLE_TRANSFORM_TYPE.
    • New field: DSTORAGE_REQUEST_OPTIONS::GaclTransformType.
  • Queues can now declare the compression format they service and whether they use GACL shuffle transforms:
    • New structures: DSTORAGE_QUEUE_DESC1 and DSTORAGE_QUEUE_INFO1.
    • New interface: IDStorageFactory1 with method CreateQueue1().
    • New interface: IDStorageQueue4 with method Query1(), which reports the declared compression format and GACL shuffle transform.
    • New enum value: DSTORAGE_COMPRESSION_FORMAT_UNSPECIFIED, reported by Query1() for queues created with CreateQueue().
    • A queue created with CreateQueue1() accepts uncompressed requests and requests in its declared format. A queue that declares a custom format accepts every custom format.
    • Queues created with CreateQueue() accept the same formats as in 1.3.
  • Add support for D3D12 CreatorIDs to improve GPU command queue parallelization:
    • New configuration structure: DSTORAGE_CONFIGURATION2 with global CreatorID field.
    • New function: DStorageSetConfiguration2() to configure DirectStorage with CreatorID support.

Bug Fixes

  • Fix a missing GPU barrier that could let GDeflate GPU decompression start before its scratch buffer was cleared.

Changes from 1.4 Previews

  • Zstd requests require a queue created with CreateQueue1() that declares DSTORAGE_COMPRESSION_FORMAT_ZSTD. Queues created with CreateQueue() reject Zstd requests, and their GetCompressionSupport(DSTORAGE_COMPRESSION_FORMAT_ZSTD) returns DSTORAGE_COMPRESSION_SUPPORT_NONE.
  • Requests that use a GACL shuffle transform require a queue that sets DSTORAGE_QUEUE_DESC1::UsesGaclShuffleTransform.
  • Removed the unused error code E_DSTORAGE_INVALID_GACL_SHUFFLE_TRANSFORM_TYPE.
  • On some GPUs, DirectStorage 1.4 decompresses Zstd on the CPU instead of the GPU. This applies only to Zstd, and games don't need any changes. On those GPUs, GetCompressionSupport reports DSTORAGE_COMPRESSION_SUPPORT_CPU_FALLBACK for Zstd.

1.3

New Features

  • New interface: IDStorageQueue3:
    • New method EnqueueRequests() that allows a batch of requests to be enqueued and synchronized with a single ID3D12Fence and value.
  • New DSTORAGE_DESTINATION type: DSTORAGE_DESTINATION_MULTIPLE_SUBRESOURCES_RANGE:
    • Enables copying one or more contiguous subresources from a source into a D3D12 resource, starting at a specified subresource index.

Bug Fixes

  • Fix built-in CPU decompression to fail requests that contain invalid or corrupted GDeflate compressed data. GPU decompression does not report these errors this way because the driver will TDR when it encounters corrupted compressed data causing the DirectStorage request to fail.
  • Fix DSTORAGE_DESTINATION_TILES for resources with different width and height.

Breaking Changes

  • Renamed MSBuild property NativeBuildDirectory to DirectStorageNativeBuildDirectory to avoid collisions with other NuGet packages.

  • Updated DirectStorageNativeBuildDirectory to include a trailing slash to follow MSBuild conventions for path properties.

1.2.4

Bug Fixes

  • Updated GPU decompression shader to be HLSL shader language version 2021 compliant. This fixes TDR issues reported on older GPUs that do not support the optimized GPU Decompression path.

1.2.3

  • Recompiled built-in GPU decompression shaders with DXC version 1.8.2405.

Bug Fixes

  • Fix deadlock in built-in decompression threadpool.
  • Disable asserts for release builds.
  • Fix race condition in file IO stack when multiple threads were submitting read requests.

1.2.2

Bug Fixes

  • Fix race condition that would, in some rare circumstances, cause DirectStorage to stop processing requests when the CPU is under high load.

  • Change DirectStorage worker thread to wakeup periodically and process requests to catch rare cases where processing has stopped.

Breaking Changes

  • Remove support for 32-bit ARM.

1.2.1

  • Ensure that the destination resource is left in the D3D12_RESOURCE_STATE_COMMON state after the DirectStorage request has completed.

1.2.0

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.

1.1.1

  • Fix region size calculation for texture destinations with DepthOrArraySize > 1 which caused bogus DirectStorage Error/Warning message DSTORAGE_MESSAGE_ID_SMALLER_UNCOMPRESSED_SIZE

1.1.0

New Features

  • Add support for GPU decompression and GDeflate:
    • New compression format: DSTORAGE_COMPRESSION_FORMAT_GDEFLATE
    • New interface: IDStorageCustomCompressionQueue1
    • New function: DStorageCreateCompressionCodec
    • New interface: IDStorageCompressionCodec
  • New interface: IDStorageQueue1:
    • New method EnqueueSetEvent() that allows a Win32 event to be signaled directly by DirectStorage.
  • Add more warnings for invalid queue capacity, and invalid request fields.

Bug Fixes

  • Fix hang when processing memory sourced requests that exceed in total the total size of the available staging buffer size.
  • Fix running on Windows Server 2016.
  • Add note in dstorage.h about how IDStorageFile::Close() doesn't affect the reference count.
  • Fail enqueued requests that require a D3D device on queues that were created without one.
  • For requests to GPU destinations (e.g. buffers, subresources), support requests that have uncompressed size greater than the destination size.

Breaking Changes

1.1.0 is source compatible with 1.0.2, but recompilation will be required so that the DirectStorage binaries match the header:

  • DSTORAGE_ERROR_PARAMETERS_REQUEST::RequestName size changed from MAX_PATH to DSTORAGE_REQUEST_MAX_NAME.
  • New DSTORAGE_CONFIGURATION fields.

This is a trade-off between having a simpler API and binary compatibility. As DirectStorage is now more feature complete with GPU decompression, binary compatibility will become a higher priority.

Known Issues

  • On older versions of D3D12, the debug layer may generate incorrect warnings that there are simultaneous writes to the input staging buffer from the copy queue that brings the data into the buffer and the compute queue that performs GPU decompression.

1.0.2

Breaking Changes

  • Update NuGet package layout to be consistent with other native NuGet packages.

New Features

  • Add DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS; these can be used to determine if the destination for a custom decompression requests is in write-combined memory.

Bug Fixes

  • Fix building on x86.
  • Improve documentation.

Performance Improvements

  • Improve Windows 10 performance.

1.0.0

First release.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Microsoft.Direct3D.DirectStorage:

Package Downloads
Vanara.PInvoke.DStorage

PInvoke API (methods, structures and constants) imported from Windows DStorage.dll.

Vanara.PInvoke.DirectX

PInvoke API (methods, interfaces, structures and constants) imported from DirectX.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Microsoft.Direct3D.DirectStorage:

Repository Stars
dahall/Vanara
A set of .NET libraries for Windows implementing PInvoke calls to many native Windows APIs with supporting wrappers.
Version Downloads Last Updated
1.4.0 506 11/24/2026
1.4.0-preview2-2606.904 5,437 6/16/2026
1.4.0-preview1-2603.504 15,534 3/9/2026
1.3.0 97,687 6/27/2025
1.2.4 59,783 4/9/2025
1.2.3 63,008 7/15/2024
1.2.2 86,425 11/15/2023
1.2.1 71,018 5/16/2023
1.2.0 114,041 4/18/2023
1.1.1 4,561 12/7/2022
1.1.0 8,831 11/7/2022
1.0.2 102,632 5/24/2022
1.0.0 8,699 3/14/2022