Commit Graph

435 Commits

Author SHA1 Message Date
marc0246
5578bf30da
Memory (sub)allocation API 2.0 (#2316)
* Excommunicate `PoolAllocator`

* Switch to manual deallocation

* Move `ResourceMemory` away from the `suballocator` module

* Remove `SuballocatorError::BlockSizeExceeded`

* Fix examples

* Fix atom size

* Address safety TODOs

* Nice English you got there bro
2023-09-03 13:09:07 +02:00
Rua
b3dbca4001
Rust 1.72 fixes (#2302) 2023-08-25 03:01:45 +02:00
marc0246
de7b6a91a0
Merge MappedDeviceMemory into DeviceMemory, make MemoryAlloc reuse the logic (#2300)
* Merge `MappedDeviceMemory` into `DeviceMemory`

* Fix soundness and utilize new `DeviceMemory` methods in `MemoryAlloc`

* Fix oopsies

* `Sync`ness

* `#[inline]`

* Big oopsie

* Language

* Sanity check for the deprecated stuff

* Full `khr_map_memory2`

* Missed trait impls

* `MemoryUnmapInfo::validate`

* Document mapping behavior of `GenericMemoryAllocator`

* Validate flags

* Update vulkano/src/memory/allocator/mod.rs

Co-authored-by: Rua <ruawhitepaw@gmail.com>

* Remove flags

* Errors

---------

Co-authored-by: Rua <ruawhitepaw@gmail.com>
2023-08-24 16:46:38 +02:00
Rua
5c67f85c99
Improve debug messenger, remove second Instance constructor (#2275)
* Improve debug messenger, remove second `Instance` constructor

* #2242

* Doctest fix

* Take Arc out

* DeviceOwnedVulkanObject

* Update vulkano/src/device/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/instance/debug.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Fixes

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-08-05 20:57:37 +02:00
Rua
cf8e8c3732
Some shader fixes and improvements (#2280) 2023-08-05 16:47:17 +02:00
Rua
b7c79acb77
ValidationError-ify futures (#2271)
* ValidationError-ify sync primitives

* Fix Windows error

* Return timeouts as errors instead

* Simplify a bit

* ValidationError-ify futures

* Update vulkano/src/sync/future/semaphore_signal.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/swapchain/acquire_present.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/sync/future/fence_signal.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-08-04 22:02:45 +02:00
Rua
fefb3b8733
ValidationError-ify queries (#2270)
* ValidationError-ify commands, add some validation to `UnsafeCommandBufferBuilder`

* Use `SubpassBeginInfo` for the triangle example

* ValidationError-ify queries
2023-08-04 21:34:43 +02:00
Rua
d0144c2d98
ValidationError-ify commands, add some validation to UnsafeCommandBufferBuilder (#2266)
* ValidationError-ify commands, add some validation to `UnsafeCommandBufferBuilder`

* Use `SubpassBeginInfo` for the triangle example
2023-08-04 20:55:16 +02:00
Rua
17dbd1ac2c
ValidationError-ify ShaderModule (#2268)
* ValidationError-ify `ShaderModule`

* Typo

* Remove leftover comments

* slice, not Iterator

* Update vulkano/src/shader/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/shader/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-07-24 22:21:05 +02:00
marc0246
2c0067067c
Switch to a more expressive way to specify memory usage (#2264)
* Switch to a more expressive way to specify memory usage

* Fix tests

* Fix examples

* Forgot to adjust `SubbufferAllocatorCreateInfo::location_preference`s

* Oopsie

* Redo all of it

* Oopsie
2023-07-19 11:11:17 +02:00
Rua
0f5e298f29
Add Format::UNDEFINED (#2262)
* Add `Format::UNDEFINED`

* Use `iter::once`
2023-07-14 16:44:34 +02:00
marc0246
6dc8e64ac7
Fix suboptimal MemoryUsage for download in examples (#2260) 2023-07-10 22:30:27 +02:00
Rua
3a5b8a4432
ValidationError-ify images and image views, fix DRM format modifiers (#2252)
* ValidationError-ify images and image views, fix DRM format modifiers

* Update examples/src/bin/triangle-v1_3.rs

Co-authored-by: Austin Johnson <me@austinj.me>

* Update examples/src/bin/triangle.rs

Co-authored-by: Austin Johnson <me@austinj.me>

---------

Co-authored-by: Austin Johnson <me@austinj.me>
2023-07-06 03:52:11 -05:00
marc0246
7a8fec9e75
Unify all image types (#2247)
* Move `Image` to the `image` module

* Unify all image types

* Fix tests

* Fix examples

* Oopsie

* Don't re-export `ImageViewType`

* Fix docs

* Fix gl-interop example
2023-07-03 22:37:29 +02:00
Rua
204811de19
ValidationError-ify samplers (#2245)
* ValidationError-ify samplers

* Fix doctests
2023-06-30 11:21:18 +02:00
Rua
da09477d01
ValidationError-ify Surface and Swapchain (#2236)
* Add `RequiresAllOf`, automatically enable required extensions and features

* Add more missing backticks and backslashes to error messages

* Use updated VUIDs that require `acceleration_structure`

* ValidationError-ify `Surface` and `Swapchain`

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Don't draw if the window has zero size

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-06-26 11:17:53 +02:00
Rua
69677346d2
ValidationError-ify GraphicsPipeline (#2234)
* Add `RequiresAllOf`, automatically enable required extensions and features

* Add more missing backticks and backslashes to error messages

* Use updated VUIDs that require `acceleration_structure`

* ValidationError-ify `GraphicsPipeline`

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-06-25 20:08:27 +02:00
Rua
9fd6e0ff45
Add support for khr_device_group_creation (#2227)
* Add support for `khr_device_group_creation`

* Fix vulkano-utils

* Apply fixes
2023-06-17 20:18:48 +00:00
Rua
45f69c17a2
Add support for two render pass extensions (#2223)
* Reorganise render pass objects, add support for some extensions

* Handle stencil initial/final layout in the macro

* This was promoted to 1.2, not 1.1

* Doctests again...

* Missing docs

* Fix bad validation

* Convert Framebuffer to ValidationError while we're at it

* FramebufferCreateFlags

* Make render pass creation more like Vulkan again

* TODO for depth_resolve_mode and stencil_resolve_mode in the macro

* Depth/stencil resolve modes

* Missed validation

* Forgot some testing code...

* msaa-renderpass docs

* Doc fixes

* Add missing backslashes
2023-06-17 19:01:50 +00:00
Arnoldas Rauba
409b620217
Fixed some examples freezing on fullscreen mode on MacOS for #2208 (#2221)
* Updated  #2208

This commit solves the problem of freezing when going fullscreen for MacOS.
It was caused because winit may behave unexpectedly when using
run_return. Winit crate generally discourages the use of that
(see: <https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return>).

NOTE. This commit only solves the problem for `interactive_fractal`
binary, but not the `multi_window_game_of_life` binary.

* Some display servers (like X.org) are not redrawing for every frame.

* Fixed the same bug for  example binary.

* Remove ControlFlow::Poll (it is the default anyway) in interactive_fractal

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Remove ControlFlow::Poll (it is the default anyway) in multi_window_game_of_life

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-06-04 09:15:21 +02:00
Rua
3e7ac8e0d4
Add support for descriptor set copies and other things (#2219)
* Add support for descriptor set copies and other things

* Typo

* Errors

* Doctest fix

* Add missing non_exhaustive
2023-06-03 14:56:27 +02:00
Gábor Gyebnár
cd9f081e3a
Fixes all examples to use at least two swapchain buffers (#2218)
* Fixes all examples to use at least two swapchain buffers.

* Fix build error
2023-06-02 22:01:38 +02:00
marc0246
08c245d7c5
Remove vulkano-win dependency from examples (#2209) 2023-05-18 14:07:30 +02:00
Rua
6816292750
Merge SyncCommandBuffer into *AutoCommandBuffer (#2207)
* 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
2023-05-18 13:03:37 +02:00
Rua
7b8225f364
Fix warnings from earlier PRs (#2206) 2023-05-12 20:26:49 +02:00
marc0246
56e6871da0
Add async update example (#2202)
* Add async update example

* Add generation

* Minor rearrange

* One more note
2023-05-12 09:53:36 +02:00
marc0246
77fa2bbfcc
Add Surface::from_window[_ref], deprecate vulkano-win (#2204)
* Add `Surface::from_window[_ref]`

* Add `Surface::required_extensions`

* Deprecate vulkano-win

* Fix SPIR-V word alignment in tests

* Fix oopsie

* Remove pointer transmute
2023-05-12 09:52:20 +02:00
marc0246
11ce974c0a
Fix attributions 2023-05-07 15:05:24 +02:00
Rua
93babbebae
Replace ImageAccess::descriptor_layouts() (#2197)
* Replace `ImageAccess::descriptor_layouts()`

* Add `WriteDescriptorSet` constructors for image views with layout

* Replace `descriptor_layouts` for real

* Small changes

* More improvements
2023-05-03 17:19:28 +02:00
dsentinel
7741e00348
Fix reading from life_out output buffer instead of life_in. (#2198)
Co-authored-by: lloyd <digitalsentinel@gmail.com>
2023-05-03 11:05:28 +02:00
Rua
b320dd26c3
Add CreateInfo for pipelines, require explicit pipeline layout creation (#2186)
* Add CreateInfo for pipelines, require explicit pipeline layout creation

* Doc fixes

* Add missing unsafe

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Add PipelineCreateFlags

* Small fixes

* -inline

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* -inline

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-04-22 20:46:22 +02:00
Rua
958a72539e
Require explicit VertexInputState creation (#2183) 2023-04-19 17:45:27 +02:00
Rua
b7679f8bbb
Rewrite shader and specialization handling in pipelines (#2181)
* 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>
2023-04-18 20:53:08 +02:00
marc0246
59be815314
Refactor AllocationCreateInfo (#2174)
* Refactor `AllocationCreateInfo`

* `debug_assert` -> `assert`
2023-04-02 15:07:16 +02:00
marc0246
ad530ed48a
Preemptively rename stuff, mark enums as non-exhaustive (#2172) 2023-04-01 18:51:58 +02:00
marc0246
5ab869156d
Fix inconsistent trailing command in renderpass macro calls (#2163) 2023-03-25 10:25:25 +01:00
marc0246
28a98f7a5f
Fix game of life example constructing one memory allocator per window (#2157) 2023-03-24 14:03:49 +01:00
marc0246
127b3eae61
Generate device properties that are alignment as DeviceAlignment (#2155)
* Move `DeviceAlignment`

* Generate alignment-properties with the type `DeviceAlignment`

* Small fix

* Another small fix

* Switch to using `is_aligned` where possible

* Oopsie
2023-03-15 22:21:44 +01:00
Francisco Ayala Le Brun
19acc71be3
Fix gl-interop not compiling (#2154)
Running this results in a segmentation fault in my machine.
2023-03-11 21:14:37 +01:00
Rua
41ded32156
Update dependencies, clippy warnings (#2142)
* Update dependencies, clippy warnings

* Remove allowed clippy lint that no longer triggers as of Rust 1.67.1
2023-03-05 20:12:17 -06:00
marc0246
baf863ce33
Resolve restrictions of BufferContents, add support for allocating all types of buffers, and rework vulkano-shaders (#2132)
* 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
2023-03-05 19:56:35 +01:00
marc0246
abfde840fa
Unify all buffer types (#2127)
* `CpuBufferPool` revamp

* Fix oopsie

* Fix docs

* Add `Subbuffer`

* Move `Buffer` to `buffer` module

* Replace all buffer types with `Subbuffer`

* Add constraints to `Index` and `QueryResultElement` traits

* Fix oopsies

* Fix examples

* Fix doc tests

* Rename `_unsized` to `_slice`

* Rename `CpuBufferAllocator`

* Implement `DeviceOwned` for `SubbufferAllocator`

* Use better generic type params

* Fix requirement message

* Fix docs

* Fix missing buffer alignment for texel buffer usage

* Add more docs to `Subbuffer`

* Add more utility functions to `Subbuffer`

* Remove superfluous `dst_offset`s

* Murder `FillBufferInfo`

* Fix example

* Add `Subbuffer::range`

* Fix wrong atom size alignment check

* Specify all fields in create infos derived from `BufferAllocateInfo`
2023-01-12 13:56:10 +01:00
Rua
4927b2ea62
Make triangle-v1_3 example work with khr_dynamic_rendering too (#2123)
* Make `triangle-v1_3` example work with `khr_dynamic_rendering` too

* Small comment fix
2023-01-07 20:37:21 -06:00
Nik Voss
834cc1eea5
Better custom vertex buffer layouts support (#2119)
* 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
2023-01-03 18:49:12 +01:00
Rua
41a37735d1
Automatically derive Pod and Zeroable for structs generated by vulkano-shaders (#2117) 2022-12-30 03:18:25 -06:00
Nik Voss
dcc1b58fab
Refactor Vertex trait to allow user-defined formats (#2106)
* 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
2022-12-28 11:23:36 +01:00
Rua
6eb526322b
Fix clippy warnings from Rust 1.66 (#2105) 2022-12-18 10:23:40 -06:00
Rua
3aca5dc190
Fix #1643 (#2103)
* Fix #1643

* Remove old code that was incorrect anyway
2022-12-16 04:40:46 -06:00
Rua
4d95604e1a
Update Ash to 0.37.1 (#2096)
* Update Ash to 0.37.1

* typo

* Add support for new shader/pipeline stages and access flags

* Small change

* Fixes

* Use ^ for version
2022-12-02 10:17:45 -06:00
Austin Johnson
93b5164b73
Fix runtime_array example (#2095) 2022-12-01 11:56:11 +01:00
Rua
9bc69940d0
Split sync module into multiple submodules, other changes to sync (#2086) 2022-11-15 02:05:03 -06:00
Rua
4ccfc925fa
Refactor DescriptorRequirements (#2081) 2022-11-09 03:35:50 -06:00
Okko Hakola
facee332ec
Fix black screen on some devices in interactive examples (#2082) 2022-11-07 08:48:25 +01:00
marc0246
fe01ddd5e3
CpuBufferPool revamp (#2076)
* `CpuBufferPool` revamp

* Fix oopsie

* Fix docs
2022-11-05 08:50:46 +01:00
Rua
a984a925c4
Use actual integer bitflags for Vulkan bitflag types (#2073)
* 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
2022-11-05 00:02:28 -05:00
marc0246
6b2d21e9f5
Fix StandardCommandBufferAllocator example docs (#2072) 2022-10-31 09:06:08 +01:00
marc0246
45f3eb9ac8
Implement allocator traits for Arcs (#2068) 2022-10-31 08:08:59 +01:00
Rua
bdcb79609e
Update render pass checks for new VUID (#2055) 2022-10-30 04:37:34 -05:00
marc0246
d5d47d7757
Further improvements to command buffer allocation (#2053) 2022-10-29 19:34:07 +02:00
marc0246
8a1c91f556
Make command buffer/descriptor set allocators Sync again (#2046)
* Make cmd buffer/desc set allocators `Sync` again

* Ingles
2022-10-27 20:59:47 +02:00
marc0246
34b709547f
Memory allocation revamp (#1997)
* Add suballocators

* Add tests

* Retroactively abort `PoolAllocatorCreateInfo`

* Use const generic for `PoolAllocator`'s block size

* Move `new` and `try_into_region` to `Suballocator`

* Move `allocate_unchecked` to `Suballocator`

* Fix constructor visibility

* Move `free_size` to `Suballocator`

* Small fixes

* Merge `BumpAllocator` and `SyncBumpAllocator`

* Restrict `AllocParent::None` to tests

* Rewording

* Add dedicated allocations

* Add `Suballocator::cleanup`

* Make `free_size`s lock-free

* Add `Suballocator::largest_free_chunk`

* Add `ArrayVec`

* Remove useless `unsafe`

* Add `MemoryAllocator`

* Add `GenericMemoryAllocator`

* Small fixes

* Retroactively abort `largest_free_chunk`

* Small docs adjustments

* Rearrange

* Add `MemoryAlloc::mapped_ptr`

* Fix oopsie

* Add support for non-coherent mapped memory

* Add `DeviceOwned` subtrait to `Suballocator`

* Move granularities to suballocators, fix tests

* Add cache control

* Fix oopsie where alignment of 0 is possible

* Store `Arc<DeviceMemory>` in suballocators

* Add `MemoryAllocator::create_{buffer, image}`

* Remove `MemoryPool`

* Fix examples

* Remove `MemoryAlloc::{memory, memory_type_index}`

* Minor improvement to `AllocationCreationError`

* Add some example docs

* Add support for external memory

* Swicheroo

* Small fix

* Shorten sm names, cache atom size in suballocators

* Add config for allocation type to generic allocatr

* Engrish

* Fix a big oopsie

* Spliteroo

* Inglisch
2022-10-26 16:25:01 +02:00
Rua
0b5ad98b44
Move resource locking to submit function (#2041) 2022-10-23 17:29:40 -05:00
Rua
cdab36a322
Remove type parameter from Surface (#2036) 2022-10-20 02:26:34 -05:00
Rua
43223f564b
Add safety checks to semaphores, add importing and exporting (#2035)
* Add safety checks to semaphores, add importing and exporting

* Small fix

* Limit test to unix only
2022-10-12 19:04:54 -05:00
Rua
df26f8105e
Buffer and image uploads take a command buffer instead of making one (#2030) 2022-10-08 08:22:37 -05:00
marc0246
3c6c1c909f
Remove unneccessary muts left after #1957 (#2029) 2022-10-07 08:59:54 +02:00
marc0246
ef65c98ad1
Move to manual management of descriptor set and command buffer allocators (#1957)
* Rename `Pool` -> `Allocator`

* Fix module names

* Rename actual pool types

* Remove internally managed allocators

* Fix doc tests

* Update docs

* Update examples

* Fix merging oopsie

* Fix cb allocators only working for one q family

* Make `DescriptorPool` `!Sync`, remove `&mut`

* Combine lean files

* Consistency

* Rename single layout pools

* Re-export variable descriptor set pool

Co-authored-by: comrademarc <40955683+comrademarc@users.noreply.github.com>
2022-10-05 11:09:26 +02:00
Austin Johnson
6e4d8c3494
Swapchain acquisition checks (#2009)
* Initial solution to swapchain acquisition checks

* replace internal_object comparisons
2022-10-02 10:44:46 +02:00
Rua
f96519a8a3
Add state tracking and validation to Fence (#2010)
* Add state tracking and validation to `Fence`

* Forgot bind_sparse
2022-10-01 21:32:17 -05:00
Rua
6b19b6ccf4
Remove command_buffer::submit module, make new Queue methods public (#2002) 2022-09-27 02:58:47 -05:00
Rua
c085dd8d9f
Queue operations refactoring (#1995) 2022-09-24 01:45:06 -05:00
Rua
0bab019d10
Treat atomic writes in shaders as write accesses (#1989) 2022-09-18 02:45:55 -05:00
Austin Johnson
8f99ceab32
Example Tweaks (#1987)
* Example Tweaks

* use released glium
2022-09-17 17:37:22 +02:00
Rua
46187e85fb
Rename next and chunk methods of CpuBufferPool for consistency (#1978) 2022-09-17 02:51:26 -05:00
Austin Johnson
8e8482016a
Impl Present Wait Feature (#1965)
* 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
2022-09-17 09:38:32 +02:00
Codotaku
e0af8af960
fix (#1977) 2022-09-13 21:11:54 +02:00
Rua
e99ad4fce5
Add khr_external_fence and remaining parts of khr_external_semaphore (#1972) 2022-09-13 04:07:10 -05:00
Rua
4abc27b9e5
Make PhysicalDevice an independent object (#1967)
* Better validation and errors

* Small fix

* Make `PhysicalDevice` an independent object

Co-authored-by: Austin Johnson <me@austinj.work>
2022-09-10 01:00:08 -05:00
Rua
2705984c77
Macrofy all Vulkan bitflag and enum types, check for device support (#1964) 2022-09-05 15:16:40 -05:00
Rua
f96768f556
Slight change 2022-09-05 15:57:53 +02:00
Rua
5a1df026dc
Reword for clarity 2022-09-05 15:57:11 +02:00
Rua
f77644bcef
Refactor bind/push commands (#1962) 2022-09-02 11:02:41 -05:00
Rua
f0e6e4c6b7
Fix or allow all Clippy errors, re-enable dead code and unused variable warnings (#1953) 2022-08-12 05:18:35 -05:00
antonino maniscalco
77e59002de
Merged ImmutableBuffer into DeviceLocalBuffer #1934 (#1936)
* Merged `ImmutableBuffer` into `DeviceLocalBuffer` #1934

* Updated documentation
2022-07-31 11:54:46 +02:00
Rua
14f14f76ee
Update winit to 0.27 (#1933)
* Update winit to 0.27

* Fix windows

* Better fix?
2022-07-30 01:58:44 -05:00
Rua
6a755cd2f3
Add VulkanLibrary as first initialization step before Instance (#1932)
* Add `VulkanLibrary` as first initialization step before `Instance`

* Fix MacOS error

* Fix Vulkano-utils
2022-07-30 01:53:52 -05:00
Austin Johnson
df97b2c55f
Support for VK_KHR_portability_subset Devices (#1927)
* 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
2022-07-18 15:11:43 +02:00
Joseph Micheli
e8cf282e51
Documentation todos (#1920)
* 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
2022-07-13 12:26:47 +02:00
Okko Hakola
18f68337a5
Vulkano util proposal (#1918)
* Init vulkano util library

* Add window & renderer structs

* Update fractal to use vulkano utils

* Add general purpose image view generation to storage image

* Add some missing functionality

* Fix game of life

* Rename error

* Fix tests

* Update documentation texts

* Modify license comment

* Add to changelog

* Improve docs

* Allow option to wait on the future

* Update doc text

* Add filter fn

* Modify queue selection

* Fix import error

* Remove non working tests

* Rename start and finish frame to acquire and present

* Allow pub creation of window renderer

* Ensure config members are pub and it has send + sync

* Remove send syncs
2022-06-24 17:27:33 +02:00
Rua
6352adf4ff
Add support for dynamic rendering (#1902) 2022-05-29 11:53:36 -05:00
Ryan Andersen
a89359007b
Image extent zero length (#1893)
* Updating examples and SwapchainCreationError enum to resolve #1892 and related discussion

* Slightly better documentation
2022-05-09 14:25:26 +02:00
Ryan Andersen
ba7f0b20e6
Device local example (#1890) 2022-05-06 18:31:08 +02:00
Rua
9e2b41a5c4
Improve render pass commands, more validation (#1884)
* 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>
2022-04-23 20:16:19 -05:00
Okko Hakola
f523234e41
Fix debug utils message severity error (#1883) 2022-04-19 16:24:58 +02:00
Rua
201e21d3e6
Rewrite copy commands (#1873)
* 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
2022-04-16 15:02:42 +02:00
Rua
44e30574d9
Rename debug commands, add some new ones (#1878) 2022-04-16 07:54:32 -05:00
Okko Hakola
d1ab3f6726
Fix game of life example on macos (#1829) 2022-03-28 15:28:51 +02:00
Rua
c70fcc575f
Rework mapped memory, add BufferContents trait with bytemuck (#1853)
* Rework mapped memory, add `BufferContents` trait with bytemuck

* Platform fix
2022-03-07 02:30:49 +07:00
Rua
9e8682fce7
Add UnsafeImageCreateInfo and ImageViewCreateInfo (#1844) 2022-02-27 00:18:14 -06:00
Rua
a593fee072
Add SamplerCreateInfo and SamplerYcbcrConversionCreateInfo (#1842) 2022-02-26 02:46:53 -06:00