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

extensions: Only call assume_init() when Vulkan returns SUCCESS #669

Merged
merged 1 commit into from Oct 14, 2022

Commits on Oct 14, 2022

  1. extensions: Only call assume_init() when Vulkan returns SUCCESS

    It is undefined behaviour to construct a safe object by calling
    `MaybeUninit::assume_init()` when the object in question hasn't been
    initialized by anything (in this case the underlying Vulkan call) at
    all, even if the object is never "used".  Postpone the `assume_init()`
    call until after checking if `vk::Result::SUCCESS` has been returned by
    the native implementation, by introducing a new
    `assume_init_on_success()` helper that takes a `MaybeUninit<T>`.
    MarijnS95 committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    48030d9 View commit details
    Browse the repository at this point in the history