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

Use range-based state tracking for SyncCommandBuffer #1862

Merged
merged 3 commits into from
Mar 22, 2022

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Mar 18, 2022

Changelog:

- **Breaking** All `check_buffer_access` and `check_image_access` functions now take an `UnsafeBuffer`/`UnsafeImage` and a `Range<DeviceSize>`.
- **Breaking** `UnsafeCommandBufferBuilder::pipeline_barrier` now takes a `DependencyInfo`. It will use `vkCmdPipelineBarrier2` if supported.

Like the previous PR, not many actual user-visible changes here. The major change here is that SyncCommandBuffer now tracks the state of resources as subranges too when building the command buffer or when checking for access. This means that the access state is tracked individually for each byte of a buffer and each subresource of an image, and pipeline barriers are applied to these subpieces instead of to the whole thing.

The buffer and image types themselves may not yet make full use of this capability; for example, an image view can select a subresource range from its parent image, but it's still treated in the command buffer as if it covers its whole parent. This is work for a future PR; the groundwork has been laid so the capability is now there. I'm happy to say that the texture_array example is working again, however.

@Rua Rua merged commit f2c4bef into vulkano-rs:master Mar 22, 2022
Rua added a commit that referenced this pull request Mar 22, 2022
@Rua Rua deleted the sync-cb-range branch May 31, 2022 18:35
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

Successfully merging this pull request may close these issues.

2 participants