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

Provide "committed resource" semantics in HAL #2511

Open
kvark opened this issue Dec 13, 2018 · 4 comments · May be fixed by #2929
Open

Provide "committed resource" semantics in HAL #2511

kvark opened this issue Dec 13, 2018 · 4 comments · May be fixed by #2929

Comments

@kvark
Copy link
Member

kvark commented Dec 13, 2018

Primary motivation is getting advantage of vk-mem by @gwihlidal in our Vulkan backend. The new API entry points for buffers and images could return BoundXxx right away.

Implementing in D3D11/D3D12 and Metal is also going to be straightforward.

@grovesNL
Copy link
Contributor

Is there a way we could make these optional so users could opt-in? i.e. thinking about the rendy-memory case where memory allocation is managed at the HAL abstraction level, not per backend.

Maybe we could have an optional feature and expose entry points through a HAL extension?

@kvark
Copy link
Member Author

kvark commented Dec 13, 2018

@grovesNL I think in this case we can just non-optionally expose the extra (2) entry points. If the user uses rendy-memory, they are just simply not using the new entry points. The only downside for them is dragging the vk-mem dependency.

@grovesNL
Copy link
Contributor

Right, it seems a bit unfortunate to always include the additional dependency (mostly since it requires building a C++ project).

@kvark
Copy link
Member Author

kvark commented Dec 13, 2018

Now that I think of it, we don't have to include this dependency. We'll get the cleanest solution by having vk-mem dependency as optional (off by default), and just allocate a memory chunk per object (ourselves) if those new entry points are used without the dependency enabled. Hopefully, nobody would depend on this behavior in critical code ;)

@kvark kvark removed the api: hal label Jun 26, 2019
@kvark kvark linked a pull request Jul 31, 2019 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants