ash/ash
Marijn Suijten 6ed9ba4b7b
Call Vec::set_len() after checking for Vulkan errors (#684)
The entire reason for calling `unsafe` `set_len()` after the Vulkan
driver function call is to ensure the `Vec` never gives safe access to
uninitialized values (as allocted via `Vec::with_capacity()`).  This
contract is broken within the implementation of these functions by
temporarily setting a nonzero length when the Vulkan driver may not have
initialized the underlying data at all, and communicated this by
returning an error code.

Simply check the error code first, before jumping to a now-infallible
codepath that calls `.set_len()` and always returns `Ok()`.
2022-11-22 23:27:33 +01:00
..
src Call Vec::set_len() after checking for Vulkan errors (#684) 2022-11-22 23:27:33 +01:00
tests Replace builders with lifetimes/setters directly on Vulkan structs (#602) 2022-03-29 19:15:14 +02:00
build.rs Support linking Vulkan directly (#457) 2021-09-09 22:50:34 +02:00
Cargo.toml Update Vulkan-Headers to 1.3.235 (#667) 2022-11-22 23:13:09 +01:00
LICENSE-APACHE Adds LICENSE-* files to crate subdirectories (#452) 2021-07-09 12:21:15 +02:00
LICENSE-MIT Adds LICENSE-* files to crate subdirectories (#452) 2021-07-09 12:21:15 +02:00