* Merge `SyncCommandBuffer` into `*AutoCommandBuffer`
* Commands take containers directly instead of iterators
* Use allocator as the type parameter for built command buffers
* Don't make `UnsafeCommandBuffer` keep objects alive
* Re-add impl for Arc
* Fixes
* Doc fix
* Replace `ImageAccess::descriptor_layouts()`
* Add `WriteDescriptorSet` constructors for image views with layout
* Replace `descriptor_layouts` for real
* Small changes
* More improvements
* Rewrite shader and specialization handling in pipelines
* Make the shader loading in examples a bit cleaner
* Forgot some
* Fix incorrect color blend states in examples
* Nicer fix
* Use mem::discriminant
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
---------
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
* Move `DeviceAlignment`
* Generate alignment-properties with the type `DeviceAlignment`
* Small fix
* Another small fix
* Switch to using `is_aligned` where possible
* Oopsie
* Add `BufferContentsLayout`
* Rework `BufferContents`
* Add `BufferContents` derive macro
* Relax restrictions of shader code generation
* Fix examples
* Add additional invariant to `Subbuffer`
* Shorten paths a bit
* Remove a bit of bloat
* Add `Sized` constraint to element traits
* Fix an oopsie
* Add `Aligned`
* Add support for deriving `BufferContents` for sized types
* Fix alignment and padding issues
* Fix docs and add examples for `BufferContents`
* Adjust shader macro
* Add tests
* Adjust `Vertex` example
* Remove bytemuck re-export
* Update examples
* Workaround bytemuck's array elements that are `AnyBitPattern` limitation
* Add more alignments
* Fix an earlier oopsie
* Rework vulkano-shaders
* Fix examples
* Fix some rogue tabs in examples
* Add `AsRef` and `AsMut` implementation for `Padded`
* Remove useless code duplication
* Make the `BufferContents` derive macro the same for all types
* Add example docs for `Padded`
* Work around trivial bounds
* More example docs
* Minor consistency adjustment
* Add `serde` to the list of cargo features
* Make clippy happy again
* Implement VertexDefinition for VertexBufferInfo, change Vertex signature to return VertexInfo and implement VertexInput-trait helper for Vertex to construct VertexBufferInfo objects from Vertex types. Updated teapot example to show usage.
* Reimplement BuffersDefinition leveraging VertexBufferInfo
* Reduce the amount of types required, remove VertexInfo, expose VertexBufferInfo methods on Vertex and use std HashMap transparently instead.
* Fix teapot example
* Fix outdated docs and use full path to Vertex trait to avoid issues
* Fix formatting of imports
* Remove clone and directly instantiate VertexInputBindingDescription.
* Rename VertexBufferInfo to VertexBufferDescription and being update of examples to use it
* Run cargo clippy fix to cleanup imports in examples
* Remove obsolete comment
* cargo fmt
* Refactor Vertex trait to not rely on ShaderInterfaceEntryType::to_format and instead rely on Format provided by VertexMember trait.
* Add test for impl_vertex macro, remove tuple implementations as they do not implement Pod, minor cleanups to impl_vertex macro.
* #[derive(Vertex)] proc-macro implementation with support for format and name attributes. Tests are implemented for both attributes and inferral matching impl_vertex macro
* Rename num_elements into num_locations to make purpose clear, add helper function to calculate num_components and check them properly in BufferDefinition's VertexDefinition implementation.
* Rename num_locations back to num_elements to make distinction to locations clear. Updated VertexDefinition implementation for BuffersDefinition to support double precision formats exceeding a single location.
* Add additional validation for vertex attributes with formats exceeding their location.
* Collect unnecessary, using iterator in loop to avoid unnecessary allocations.
* Use field type directly and avoid any form of unsafe blocks.
* Match shader scalar type directly in GraphicsPipelineBuilder
* Rename impl_vertex test to fit macro name
* Add VertexMember implementatinos for nalgebra and cgmath (incl matrices).
* Add missing copyright headers to new files in proc macro crate
* Document derive vertex with field-attribute options on the Vertex trait
* Add example for vertex derive approach.
* Do not publish internal macros crate as it is re-exported by vulkano itself
* Deprecate impl_vertex and VertexMember and update documentation for Vertex accordingly
* Make format field-level attribute mandatory for derive vertex
* Update all examples to derive Vertex trait instead of impl_vertex macro
* Fix doctests by adding missing imports and re-exporting crate self as vulkano to workaround limitations of distinguishing doctests in proc-macros
* Use actual integer bitflags for Vulkan bitflag types
* Fix doc tests
* Fix Fence and Semaphore on Win32 and Fuchsia
* Add macro for bitflags that have a corresponding enum
* Fix bug
* impl present_wait feature
* handle timeout case
* add missing doc
* document the return type of wait_for_present
* impl check for VUID-04999
* don't enforce gt if present_id is zero
* impl PresentInfoExt
* Remove NonZeroU64 from wait_for_present in favor of an error
* fix gl-interop example
* fix docs and fmt
* PresentInfoExt -> PresentInfo, Added swapchain + index to info
* fix doc test, didn't save file...
* fix gl-interop
* Remove Whitespace
* opt-in portability
* Only enable portability flag if extension is present
Automatically enable khr_portability_subset on Device; Remove required_extensions from PhysicalDevice & Device
* enable InstanceCreateInfo.enumerate_portability on all examples
* add additional documentation for enumerate_portability
* Added ImageUsage::transient_input_attachment()
* Address TODOs in examples
* Added actual example to command_buffer module documentation.
* Fixed error in command_buffer example
* Check max_framebuffer_height/width/layers in AttachmentImage constructors.
* Add detailed explanation for shader! macro to triangle examples
* Use only the selected range of buffer and image views in synchronization
* Improve render pass commands, more validation
Co-authored-by: Austin Johnson <me@austinj.work>
* Allow `SyncCommandBufferBuilder` commands to specify the access range
* Allow `SyncCommandBufferBuilder` commands to specify the access range
* Better handling of image initialization
* Small fix
* Rewrite copy commands
* Better handling of maintenance1
* Small leftovers
* Remove conflict_key
The readme still redirected users to the vulkano-examples repository. This has since been achieved. Included a step-by-step guide to switching version tag.
* Convert creation of `Instance` and `Device` to use a builder
* Big oops
* Add `InstanceCreateInfo` and `DeviceCreateInfo`
* Doc fix
* impl FromStr for Version, remove elidable qf2
* Allow `copy_image` source and destination to be the same image
The doc: `srcImage and dstImage can be the same image or alias the same
memory`.
This was achieved by locking only one image exclusively if both are the same.
* Allow `blit_image` and `copy_buffer` to have the same src/dest buffers
Regarding this and the previous commits, I noticed an important note in
the docs.
`regions must not overlap`
Before this, it was not important check for us to do, since we can't
have overlapping regions if both buffers are different. But now we must
add some checks to make sure its safe to use these functions while also
allowing for shared buffers between src and dest.
* Added bounds and overlapping checks for `copy_buffer`
* Added overlap checks for `blit_image` and `copy_image`
Created utility file `src/command_buffer/validity/ranges.rs` which hold
functions that help compute if there is overlap in regions.
* Fixed bug in regions overlap check
It should be ANDed together and not ORed
* Added `image_blit` to the `image-self-copy` example
* Added example for `copy_buffer_dimensions` using `basic-compute-shaders`
Also updated copyright year for this and the `image-self-copy-blit`
example.
* Added command `clear_attachment`
This command implements `vkClearAttachments`, most checks are done
except for:
- Handling attachments with `VK_ATTACHMENT_UNUSED`, `vulkano` doesn't
support unused attachments for now.
- command buffer protection and protectedNoFault, which `vulkano` is not
supporting now.
* Added `clear_attachments` example
This explains the usage of `clear_attachments` command
* Modified `ClearRect.rect_offset` to use `u32`
Since, in vulkan docs, it says that the rect must be inside the render
area, its better to use `u32` so that we don't get negative values since
its not applicable here.
I was using `i32` because in vulkan docs its using `VkRect2D` inside
`VkClearRect` which is a general rectangle object. Since ours is only
specific to `ClearRect` its better to make it specific.
* Bring vertex input in line with other pipeline state, reorganise modules
* Documentation improvement
* Use ShaderInterfaceEntryType in shader interface instead of format
* Example fix