* 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
* vulkano/image: SampleCounts for each pixel in an Image.
Map u32-bit SampleCountsFlagBits type to boolean collection of
SampleCounts struct type.
* vulkano/image: Convert between vk::SampleCountFlags and SampleCounts
* Move physical device functions into their own module
* Add method to FunctionPointers to query Vulkan api version
* Store the versions of instances and devices, allow user to query
* Check Vulkan version in vulkano-shaders, changelog
* Small mistake in changelog
* Add core instance extensions.
core extensions added as part of `vulkano::instance::InstanceExtensions`
VK_KHR_device_group_creation
VK_KHR_external_fence_capabilities
VK_KHR_external_memory_capabilities
VK_KHR_external_semaphore_capabilities
VK_KHR_get_display_properties2
VK_EXT_acquire_xlib_display
VK_EXT_debug_report
VK_EXT_direct_mode_display
VK_EXT_display_surface_counter
* export FunctionPointers::entry_points method.
Similar to PhysicalDevice.instance().pointers() export root-level
entry_points() method. This will allow applications to call vk-functions
like `vkEnumerateInstanceExtensionProperties` directly.
* heap: Add MEMORY_HEAP_MULTI_INSTANCE_BIT for MemoryHeap.
A new method is_multi_instance() method is added to `MemoryHeap` to
know whether the heap is enabled for multi-instance.
* CHANGE-LOG.
* Remove format structs, StrongStorage trait
* Remove a bunch of superfluous traits and functions
* Remove FormatDesc trait
* Make formats macro a bit easier to read
* Rename AcceptsPixels trait to Pixel, reverse implementation direction
* Changelog
* Documentation
* Improved image aspects, add aspects to Format
* Add get_results to UnsafeQueriesRange
* Add copy_query_pool_results command, remove "Unsafe" from names
* Documentation + changelog
* Add reset_query_pool
* Add begin_query and end_query
* Add query feature checks when starting an AutoCommandBufferBuilder
* Add write_timestamp
* Re-exports
* Further safety checks for write_timestamp
* Track query active state in AutoCommandBufferBuilder, further safety checks
* Move query/mod.rs to query.rs as there's no other submodules
* Check for query state when building
* 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
from_data needs flat memory structures. Types which implement
Copy (either implicity or explicitly) ensure this property.
This commit adds the Copy trait bound to
{CpuAccessibleBuffer,ImmutableBuffer}::from_data and adapts the unit
tests accordingly.
* 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.
* Add posix handle type shortcut
* Expose device local buffer's memory
* Add exportable memory option for pools & device local memory
* Add test for device local with exportable fd
* Use a convenience function in test
* Dont expose memory, but instead allow export fd directly
* Fix mistakes & clean
* Remove test due to IncompatibleDriver error
* 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
* Write descriptor set layout structs for each entrypoint rather than for the entire module
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* Fix descriptor set calculation for all storage classes across all SPIRV versions by inspecting each entrypoint's instruction tree. Also adds 27 instructions to parse.rs.
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* Add unit tests for descriptor set calculations
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* Fix BufferBlock not counting as a Block decoration on structs (this fixes the unit tests from 4875bcc2)
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* cargo fmt
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* Update changelog
Signed-off-by: Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
* Fix invalid reference to dropped cache object in compute pipeline
This is achieved by preventing the cache object from being partially
moved.
This fixes issue #1466.
* Add entry to changelog
* vulkano: image: improve formatting
Ran cargo fmt --all. Should we use clippy too ?
* vk_sys: add additional formats
This updates the vk formats enum to the header that's on my
system (vk 1.2-ish).
* vulkano: image: Add NV12 and YV12 support
These formats are commonly used as targets for hardware and
software video decode. The common case is the swapchain allocator
(gralloc in the Android use case) allocates some memory, the video
stack decodes to it, and then memory can be composited by Vulkan
or sent directly to the display.
* vk_sys: update structure types
This updates the structure types to a VK 1.2-ish state. Long term,
it makes a ton of sense to autogenerate vk-sys to make adding
additional features and enumerations easier [1]. For now, we can
hand edit.
[1] (https://github.com/vulkano-rs/vulkano/issues/89)
* vk_sys: add VK_KHR_external_memory_fd bindings
This adds some basic external memory features. Most of these
features are core in VK1.1.
* vulkano: memory: add and use DeviceMemoryBuilder
We'll need to:
(a) Create exportable memory
(b) import from a OS descriptor to create DeviceMemory
(c) Also support dedicated allocations
The device memory API is becoming rather complicated. Let's use
the common builder pattern to simplify this.
* vulkano: memory: implement some external features
This change is sufficient to create exportable memory and
export it. It's only been tested on Linux platforms and depends
on Unix file descriptors, so enable it only there for now.
Import support will be added later. Support for external buffers
and images can also be added later if someone needs it.
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
* Unlock images correctly on Err
If the CommandBuffer encountered an error in the lock_submit function,
it would unlock all the previously locked resources and return the
error. It would unlock all the images with a None value which would
panic in an assertion in the unlock method of the images. Now it checks
for the final_layout and unlocks the image this way.
This change should help with the panics mentioned in #1441 and #1447.
With this fix it should return the error that is occuring instead of
panicking.
* Add fix to the change log to inform users.
* 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
* Feature: Create a Surface from a RawWindowHandle
* Comment on the new features
* Updated changelog
* Corrected feature name
* Compiler error corrections
* Empty commit for CI
Co-authored-by: Antonino Siena <a.siena@gmx.de>
Without this, an application has to create their own loader for the
Vulkan function pointers if they need to drop down to raw Vulkan
calls. It's not a lot of effort to load them, but it's nicer to just
have them available on the Instance or Device rather than having to
pass an extra parameter around for function pointer access.
Co-authored-by: Austin Johnson <me@austinj.work>
* 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
* Add Eq and Hash implementations to various buffer and image types
* Changelog entry
* Add Eq and Hash to graphics pipelines too
* Changelog entry
* Remove Eq and Hash from dyn GraphicsPipelineAbstract, as the device cannot be checked
* Add Eq and Hash to GraphicsPipelineAbstract, include size in buffer equality
* Add Eq and Hash to descriptor sets
* Changelog entry
* Add Eq and Hash to Instance, check for it in Device