* vulkano_shaders_derive exposes a proc_macro instead of a proc_macro_derive
* move vulkano_shader out of vulkano_shaders_derive and deprecate vulkano_shaders_derive
* Update documentation
* Move vulkano_shader! to root of mod, so it works with rust 1.30
SPIR-V allows the array stride and size of a type to differ, but rust defines them to be the same. Thus
certain types when represented in rust will have the wrong layout. E.g. an array of vec3 can have an array
stride of 16 in SPIR-V, but an array of [f32;3] in rust would have a stride of 12. Thus using one for the
other would cause corruption.
This suggests a workaround by using a wrapping struct or upgrading the size of the type to one where the size
is the array stride.
I considered generating the wrapping struct for the user, but that seems very confusing for the user. We could
generate wrapping structs for all vec and mat types in arrays, but that would be a large API change.
See #298.
Expand MissingUsage into MissingBufferUsage and MissingImageUsage
each with an enum so that the usage that is missing is obvious
in the error, e.g.:
thread 'main' panicked at 'add curimage: MissingImageUsage(Storage)'
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
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
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
* Fixed the layer scaling issue on macOS. Changed the triangle example to use the surface extents instead of window dimensions, as that seems to be a more robust source of correct information.
* Updated changelog. Fixed other examples' window extent problem.