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

Resources management suggestion #1

Closed
tomaka opened this issue Nov 1, 2015 · 1 comment
Closed

Resources management suggestion #1

tomaka opened this issue Nov 1, 2015 · 1 comment

Comments

@tomaka
Copy link
Member

tomaka commented Nov 1, 2015

This is mostly a post-it so that I don't forget this idea.

It should be possible to transition resources between states encoded in the type system, like this:

struct Buffer {
    ...
}

struct FenceLockedBuffer {
    ...
}

struct LockedBuffer {
    ...
}

You could only modify a Buffer. When executing a command, the user could choose between creating a fence or not. If creating a fence, the Buffer would turn into a FenceLockedBuffer. If not creating a fence, the Buffer would turn into a LockedBuffer.

A FenceLockedBuffer could be turned back into a Buffer by blocking. Both FenceLockedBuffer and LockedBuffer could be used when executing commands.

However this system doesn't say how to handle the relationship between buffers/textures and command buffers.

@tomaka
Copy link
Member Author

tomaka commented Feb 18, 2016

Vulkan doesn't guarantee that command buffers will be executed in the order you submit them, so this idea is discarded.

@tomaka tomaka closed this as completed Feb 18, 2016
tomaka added a commit that referenced this issue Apr 11, 2016
tomaka pushed a commit that referenced this issue Jul 23, 2017
freesig referenced this issue in freesig/vulkano Dec 27, 2018
Limeth pushed a commit to Limeth/vulkano that referenced this issue Jun 16, 2019
blacksailer pushed a commit to blacksailer/vulkano that referenced this issue Nov 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant