It was recently discovered in rust-lang/rust#50781 that `Self: Trait` bounds in trait methods are really not object-safe. This will be made into a warning by rust-lang/rust#50966, and vulkano will be affected by the warning .
Thankfully the fix looks simple, by just moving `fn len` from `BufferAccess` to being directly in `TypedBufferAccess`.
This updates the asserts in `RenderPass` creation to allow
`VK_SUBPASS_EXTERNAL` as a special value in addition to any value less
than the total number of subpasses. This enables custom unsafe
implementations of `RenderPassDesc` to define their external dependencies.
* Allow Surface to reference an external window object
This makes the Surface struct generic across a Window
type, so that a surface can own (or reference, if W is
an Arc) an external window object.
This also updates vulkano-win to take advantage of this.
There is no longer a dedicated Window struct in vulkano-win.
Instead, the Surface is simply passed ownership of the
winit::Window.
This fixes#844
* Update examples for new surface API
* Update Changelog
* Remove unnecessary send/sync bounds
* Update swapchain docs for new Surface behavior
This isn't full documentation of everything that the crate generates,
but it at least covers how to use it. I'm only working off my reading
of the source code, so it's entirely possible I got things wrong, but
crappy documentation is better than no documentation. I think.
Note that this has to add vulkano itself as a dev-dependency in order
for the doctest to compile, but that's also going to help with writing
tests if that ever happens.
An improvement over this would be to detail what the proc macro itself
generates and the functions, structs, etc you get from it. The details
on that are in vulkan-shaders, and are a bit harder to decipher.
Previously, it was possible for the hardlinked glslangValidator
to become truncated when the glsl-to-spirv crate was rebuilt. The
file would be successfully hardlinked the first time, but on
subsequent builds the hardlink attempt would fail becasue the target
already exists. This would cause the build script to fall back to
a copy, which truncates when source and dest are the same file.
This removes the hardlinking entirely, meaning that we always just
copy our built glslangValidator to where we want it. While it would
be possible to try to make the hardlinking/copying logic idempotent,
the complexity (and potential fragility to similar bugs in the
future) doesn't seem worth it to avoid one copy.
This fixes#95