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

D3D12 - Add support for memory allocators #246

Open
kingofthebongo2008 opened this issue Sep 10, 2021 · 3 comments
Open

D3D12 - Add support for memory allocators #246

kingofthebongo2008 opened this issue Sep 10, 2021 · 3 comments

Comments

@kingofthebongo2008
Copy link

CreateComittedResource is fine,

However is good to add interface to CreateTexture, CreateTextureEx

Particularly on d3d12 this allocator is very often used

https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator

@kingofthebongo2008
Copy link
Author

Support for a callback to the interface + initial resource transition will be fine

@walbourn
Copy link
Member

walbourn commented Sep 10, 2021

If I do this, I should probably also update DDSTextureLoader, WICTextureLoader, etc. in the DirectX Tool Kit

Please consider filing an issue here as well: https://github.com/microsoft/DirectXTK12/issues

Currently, CreateComittedResource is called from BufferHelpers, DDSTextureLoader, GeometricPrimitive, GraphicsMemory, Model, ResourceUploadBatch, ScreenGrab, SpriteBatch, SpriteFont, and WICTextureLoader.

A likely implementation would be to add a method to the GraphicsResource class that all these modules use to CreateResources, and that could be used to hook custom allocators.

@kingofthebongo2008
Copy link
Author

Indeed, you are right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants