* 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
* Fix device memory missing p_next structures
* Fix exportable attachment image missing p_next; Fix mutable bit off
* Fix fd export for StorageImage
* Add gl-interop example; Remove debug assert comment
* Fix gl-interop example being run on Windows and MacOS
* Add builder field to DeviceMemoryBuilder
* Move shader parsing and information extraction to Vulkano, make available for runtime shaders
* Small change
* Add new pipeline stages to match shader stages
* Fix review issues
* Add basic support for khr_push_descriptor
* Add basic support for khr_push_descriptor
* Support arrays in `DescriptorWrite`
* Use assert when creating the builder
* Add extra dynamic state commands to the command buffer builders
* Add TessellationState
* Re-enable InputAssemblyState, add dynamic state, update Ash
* Rework depth_stencil module, add dynamic state
* Rename module raster > rasterization, add dynamic state
* Replace DynamicStateMode with bool, replace Option with StateMode enum for potentially dynamic states, rename Blend > ColorBlendState, add dynamic state
* Re-enable MultisampleState
* Re-enable ViewportState, add state to GraphicsPipeline with retrieval methods, add dynamic state
* Add builder methods for state types
* Color blend improvements
* Further checks on input assembly dynamic state
* Add color_write_enable
* Add topology class, check that it matches
* Add line_stipple
* Move some builder code to the individual state types
* Add discard rectangles
* Trim down GraphicsPipelineCreationError variants, order alphabetically
* Remove Send + Sync and BufferAccess traits where they are redundant
* Require Send + Sync for ImageViewAbstract
* Require Send + Sync for ImageAccess, AttachmentsList and MemoryPoolAlloc
* Require Send + Sync for DescriptorSet and DescriptorPoolAlloc
* Require Send + Sync for FramebufferAbstract
* Minor rearranging
* Require Send + Sync for PrimaryCommandBuffer, SecondaryCommandBuffer and CommandPoolAlloc
* Require Send + Sync for Command (private trait)
* Cargo fmt
* Move descriptor_set.rs to parent, make descriptor.rs its child
* Rename UnsafeDescriptorSetLayout to DescriptorSetLayout, as there isn't actually anything unsafe about it
* Make fixed_size_pool and persistent modules public, reduce number of re-exports from there
* Split off pool.rs from sys.rs
* Move std_pool module to pool::standard
* Make sys public, remove re-exports
* Move descriptor module and DescriptorSetDesc into layout module
* Move ShaderStages to pipeline::shader
* Make descriptor_set::collection module private
* Documentation
* Don't enable any features in examples unless the example requires it
* More elaborate device selection code in the triangle example
* Better device selection for all other examples
* Migrate to using Ash as a base
* Small change to test, to make it applicable to Vulkan 1.1
* Auto-generate extensions, check extension requirements
* Add documentation to extensions, use vk.xml from Ash 0.32.1
* Remove `RawDeviceExtensions` and `RawInstanceExtensions`
* Add extension conflict checking
* Small fix
* Add auto-generated features, more requirements checks
* Features documentation
* Macrofy required_if_supported_extensions
* Include vulkano-gen tool
* Move autogen imports to macros
* Change autogen into a build script
* Delete leftover file
* Autogenerate device properties
* Propagate bugfix in properties chain to features
* initial support for the `VK_KHR_multiview` extension
The `VK_KHR_multiview` extension can be used to efficiently draw to multiple layers of a framebuffer at once with.
This is particularly useful for virtual reality applications or other types of stereoscopic rendering where both eyes need to be rendered and they share almost all visible vertices.
* allow creation of multi-layer attachment images
Using the `AttachmentImage::multisampled_with_usage_with_layers` constructor.
More constructors with different combinations could be added for the `AttachmentImage` but `multisampled_with_usage_with_layers` already exposes all possible options.
I think all these different constructors should be replaced with a constructor that takes a struct that implements `Default` or an enum with the different possibilities.
* compliance with VUID-VkFramebufferCreateInfo-renderPass-02531
* removed changelog entries according to new policy
* migrate `VK_KHR_multiview` support to ash
* add more comments
* add remaining `VK_KHR_multiview` validation
* validate instanced drawing using `multiview` limits
* add some missing validation relating to `VIEW_LOCAL` dependencies
* use the vulkano device feature instead of depending on the `multiview` extension directly
* Allow choosing the Vulkan max API version when creating Instance
* Rewrite feature handling, include all Vulkan 1.1 and 1.2 features
* Fixes
* Move features.rs to device module
* More small fixes
* Changelog
* Convert trait `ShaderInterfaceDef` into struct `ShaderInterface`
* Convert some instances of PipelineLayoutDesc to RuntimePipelineDesc
* Use regular Vec for now
* Convert PipelineLayoutDescUnion to RuntimePipelineDesc
* Convert PipelineLayoutDescTweaks to use RuntimePipelineDesc
* Remove PipelineLayoutDesc trait, replace with what used to be RuntimePipelineDesc
* Remove PipelineLayoutAbstract trait
* Fix bug
* Provide value for push constants to entry point instead of type
* Remove GraphicsEntryPointAbstract, allow pipelines without fragment shader
* Move descriptor::pipeline_layout to pipeline::layout
* Small changelog addition
* Fix bug
* Create generic render pass description type, macro generates that instead of making its own type
* Replace EmptySinglePassRenderPassDesc with empty() constructor
* Remove RenderPass type parameter
* Remove RenderPassAbstract trait, type parameters that use it. Add GraphicsPipelineAbstract::subpass and Framebuffer::render_pass
* Remove RenderPassDescClearValues trait
* Remove RenderPassSubpassInterface and RenderPassCompatible traits
* Change RenderPassDesc into a struct
* Rename framebuffer module to render_pass, move/rename other things
* Rustfmt + changelog
* Documentation update
* Add pipeline barriers when executing secondary command buffers
* Add locking for secondary command buffers when executed on a primary
* Propagate flags of secondary to primary
* Forgot the vec variant
* Add poisoning as a stopgap measure to protect against inconsistent builder state
* vulkano: instance: derive Ord, PartialOrd for PhysicalDeviceType
Useful for want differeniating integrated and discrete GPUs in a
hash table.
* vulkano: don't pull in all of crossbeam
Just pull in crossbeam-queue, since that's what used.
Having a smaller set of packages is easier for system integrators
such as myself.
* vulkano: memory: add import support, separate device memory and mappings, and much more!
- Chaining structs copied shamelessly and poorly from Ash :-)
- Import support, as previously promised.
- DeviceMemoryMappings so we can maybe one day expose the binding model.
- Attempts to rigorously check Valid Usage IDs (VUIDs).
A note about error handling:
- Currently, Vulkano error handling is a bit unclear. For example, I
didn't define a "DeviceMemoryMappingError" and simply reused the
"DeviceMemoryAllocError" already present in the file. In reality,
both a theoretical "DeviceMemoryMappingError" and the already
present "DeviceMemoryAllocError" should mostly just check the valid
usage IDs present in the Vulkan spec (or return an error from the
implementation). This code pattern is common throughout Vulkano.
Perhaps we should go to a simpler VulkanoResult<T>??? Just an idea.
- Also, is Vulkano a validation layer??? LunarG tracks every single
VUIDs in their uber layer already:
https://www.lunarg.com/wp-content/uploads/2019/04/UberLayer_V3.pdf
Of course, given how Vulkan drivers are relatively straigtforward
compared to OpenGL, it's generally possible to match LunarG *using
Rust* if we just have a big enough community. Whether we want to or
not may be up for debate. For now, I just followed the original
vision of tomaka and added validation. If we do want to do it, then
we have to be more rigorous about it.
* Rename Dimensions > ImageViewDimensions, ViewType > ImageViewType
* Remove cubemap_compatible from ImageDimensions, add ImageCreateFlags to UnsafeImage creation
* Replace various UnsafeImage features/usage methods with new ones that return them directly
* Create image::view module, move view-related types into it
* Create safe ImageView type, remove some of the validity checks from UnsafeImageView
* Removed ImageViewAccess::samples and moved the descriptor_set_* functions to ImageAccess
* Remove ImageViewAccess::dimensions
* Impl ImageAccess for ImageView, remove impl on image types
* Rename ImageViewAccess to ImageViewAbstract, move some methods around
* Remove ImageViewDimensions (formerly Dimensions)
* impl Error for ImageViewCreationError
* Missing pub
* Typo
* Some small documentation changes
* Check for ImageCreateFlags that are currently not properly supported
creation
To do so, we created a SubImage that implements the ImageAccess trait
This SubImage will decorate an ImageAccess image and will represent
one or more mip level / array layer level
* Implement caching for GraphicsPipeline
Added the method build_with_cache to set an Option that holds an Arc
containing a PipelineCache. This could probably be optimized to just
hold a vk::PipelineCache(u64) and start with a vk::NULL_HANDLE and
set the value to the internal_object of the PipelineCache. Using the Arc
is probably safer for now, but it is an idea.
* Add changes to the CHANGELOG
* Added a cache option to the ComputePipeline
This is a breaking change as there is no ComputePipelineBuilder and the
cache has to be added in the new function and the underlying functions
that build the ComputePipeline.
This needs to be discussed.
* Document the cache feature for the ComputePipeline
* Formatting with cargo fmt
* Remove outdated documentation
* Added testing for the PipelineCache
Checking that the cache returns the same data if the get_data method is
invoked twice without building a new pipeline.
Checking that the cache returns the same data if the same pipeline is
built two times with the cache.
Checking that the cache returns different data if there is a different
pipeline built in between the get_data calls.
* Create an example for the PipelineCache
* Formatting
* Move SubpassContents to command_buffer module, use it as parameter type instead of bool, add RenderPassState internally
* Add some safety checks to execute_commands
* Move Kind and related types to top-level module, add CommandBuffer::kind trait method, keep Kind value in AutoCommandBuffer(Builder)
* Some minor code cleanup
* Documentation update
* add additional ImageUsage constructors
* update examples to use ImageUsage::color_attachment instead of caps.supported_usage_flags
* fix additional usage in multi-window example
* update ignore to not include mandelbrot.png and triangle.png
* update ignore to not include mandelbrot.png and triangle.png
* Use traingle example as template
* Remove triangle example comments
* Switch to CpuBufferPool chunks instead of CpuAccessibleBuffer for vertex data
* rustfmt
* Keep unwrap()s on same line
* implement exclusive fullscreen
* fullscreen ext should be device ext
* add acquire/release
* require VK_KHR_get_surface_capabilities2
* fullscreen_exclusive is now an enum; explicit acquire/release methods added; FullscreenExclusiveError added to handle errors; FullscreenExclusiveLost varients added to acquire and present related errors
* add checks for double acquire/release; require AppControlled for acquire/release functions
* update examples and tests; resolve issue with try_gpu_lock() on SwapchainImage; update changelogs