Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for DirectStorage #328

Open
paulbartrum opened this issue Sep 4, 2022 · 2 comments
Open

Support for DirectStorage #328

paulbartrum opened this issue Sep 4, 2022 · 2 comments
Labels
proposal An issue that represents a proposed feature or change to the repo. untriaged An issue that has not been triaged by the repo maintainers.

Comments

@paulbartrum
Copy link
Contributor

Description

DirectStorage is now publicly available via NuGet (https://www.nuget.org/packages/Microsoft.Direct3D.DirectStorage) and both Vortice.Windows and Silk.NET support it. It would be nice for TerraFX.Interop to support it too.

It seems likely that DirectStorage will be bundled with the rest of the DirectX components at some point -- once it matures enough presumably -- and supporting it then will be a no brainer. But for now it's just a "nice to have".

Proposed API

I've tried generating bindings from the DirectStorage header files using ClangSharpPInvokeGenerator, and it seems to work fine. I just copied the settings from D3D12, filled in the response files with the relevant info and that was it.

Drawbacks

The biggest problem is that native binaries are required (dstorage.dll and dstoragecore.dll) and I don't see any examples of any TerraFX doing this. Do you want to split these DLLs out into a separate package like Vortice.Windows and Silk.NET do, and if so, does that mean a separate project within TerraFX.Interop.Windows or a whole new repo...? Another possibility is to just generate the bindings but require users to copy the relevant binaries to their bin folder manually. Note that Silk.NET actually has two packages for DirectStorage: Silk.NET.DirectStorage and Silk.NET.DirectStorage.Native with the first containing the bindings and the second containing the DLLs (with the latter being a transitive dependency of the first). I'm not exactly sure why -- possibly just so each package can have a separate license?

Alternatives

Do nothing? :-)

@paulbartrum paulbartrum added proposal An issue that represents a proposed feature or change to the repo. untriaged An issue that has not been triaged by the repo maintainers. labels Sep 4, 2022
@paulbartrum
Copy link
Contributor Author

Also I'm happy to do a PR if I can get some guidance on what approach to take with the native DLLs.

@Perksey
Copy link

Perksey commented Feb 19, 2024

Silk.NET will be looking to support this in 3.0, in which our Windows SDK bindings are just a fork of TerraFX's heavily modified by a generator. So this may result in some work flowing upstream here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal An issue that represents a proposed feature or change to the repo. untriaged An issue that has not been triaged by the repo maintainers.
Projects
None yet
Development

No branches or pull requests

2 participants