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

ValidationError-ify futures #2271

Merged
merged 10 commits into from
Aug 4, 2023
Merged

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jul 24, 2023

Changelog:

### Breaking changes
Changes to `Swapchain`:
- `acquire_next_image` and `wait_for_present` now return `Validated<VulkanError>` as their error type.

Changes to futures:
- `FlushError` is replaced with `Validated<VulkanError>`.

Depends on #2267.

Since futures are planned to be removed anyway, I didn't give these too much thought.

vulkano/src/swapchain/acquire_present.rs Outdated Show resolved Hide resolved
vulkano/src/sync/future/fence_signal.rs Outdated Show resolved Hide resolved
vulkano/src/sync/future/semaphore_signal.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bad idea, I think, to put newlines in an error message, as it's going to display poorly with chained messages in either something like "error occured: {err}" or also when using anyhow or similar where it's displayed in a list. I don't know what the best choice would be here but maybe something like:

"access to a resource has been denied (resource use: {:?}, error: {})"

vulkano/src/device/queue.rs Outdated Show resolved Hide resolved
vulkano/src/device/queue.rs Outdated Show resolved Hide resolved
vulkano/src/device/queue.rs Outdated Show resolved Hide resolved
vulkano/src/device/queue.rs Outdated Show resolved Hide resolved
Rua and others added 4 commits August 4, 2023 21:20
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
@marc0246
Copy link
Contributor

marc0246 commented Aug 4, 2023

Thanks!

@marc0246 marc0246 merged commit b7c79ac into vulkano-rs:master Aug 4, 2023
3 checks passed
marc0246 added a commit that referenced this pull request Aug 4, 2023
@Rua Rua deleted the future-validation branch October 25, 2023 14:24
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
* ValidationError-ify sync primitives

* Fix Windows error

* Return timeouts as errors instead

* Simplify a bit

* ValidationError-ify futures

* Update vulkano/src/sync/future/semaphore_signal.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/swapchain/acquire_present.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/sync/future/fence_signal.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
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