Commit Graph

395 Commits

Author SHA1 Message Date
marc0246
af57608ac5
Unify workspaces (#2391) 2023-10-31 19:15:03 +01:00
marc0246
4a77d39b85
Update dependencies (#2385)
* Update winit

* Update raw-window-handle

* Update syn

* Remove vulkano-win from the workspace
2023-10-31 18:47:17 +01:00
marc0246
1e9128795f
Workspace dependencies (#2381)
* Use workspace dependencies

* Update CI workflow to account for the two workspaces

* Make the tables in the root workspace a bit nicer to look at

* Use workspace package version

* Remove workspace package version

* Make winit a workspace dependency as well
2023-10-29 22:42:00 -05:00
marc0246
4c515a81cb
Improve the examples' directory structure (#2375)
* Make each example its own workspace member

* Fix runtime-shader example

* Fix shader-include example

* Fix teapot example

* Fix `run_all.sh`

* Fix output files getting saved in cwd

* Fix spelling for examples readme filename

* Remove wrong leftover dependencies for gl-interop

* Fix pipeline-cache example

* Clearer .gitignore

* Help cargo be less useless
2023-10-29 18:46:14 +01:00
Rua
def21843fc
Partial validation of queue commands (#2373)
* Move resource tracking/locking back from Queue to futures

* Add partially validated `submit` command

* Add partially validated `present` command

* More safety docs

* Small doc change

* Add SemaphorePresentInfo

* Put safety docs in the semaphore/fence modules instead

* More fence and semaphore docs

* Re-add missing imports

* Remove state tracking from Fence

* Remove state tracking from Semaphore
2023-10-29 01:40:28 +02:00
marc0246
94f0f8cc80
#2369 fixes (#2371) 2023-10-25 04:01:30 -05:00
marc0246
ac2a83b769
Add a StandardDescriptorSetAllocatorCreateInfo (#2366)
* Add `StandardDescriptorSetAllocatorCreateInfo`

* Fix tests and examples
2023-10-24 16:23:17 +02:00
Rua
444c88dfca
Use separate samplers and sampled images in the examples (#2354)
* Use separate samplers and sampled images in the examples

* Update examples/src/bin/push-descriptors/main.rs

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

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-10-08 14:10:19 +02:00
Rua
0fed9bbc7f
Make dynamic state future-proof and more Vulkan-y (#2348)
* Make dynamic state future-proof and more Vulkan-y

* Additional fixes

* Extra docs

* Oops

* Derp!

* Review fixes
2023-10-07 16:46:03 +02:00
Rua
3c49541bc3
Apply specialization to shader reflection (#2329)
* Apply specialization to shader reflection

* Remove redundant method

* Remove all the SpecId decorations too

* Don't unnecessarily collect the instructions

* Replace decoration groups with individual decorations

* Rename with_specialization

* Missed renames

* Remove the Arcs
2023-09-14 13:19:25 +02:00
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