Commit Graph

3409 Commits

Author SHA1 Message Date
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
Rua
f463100d4f
#2132 changelog 2023-03-05 20:00:10 +01: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
Rua
4f03fe55ac
#2150 changelog 2023-03-03 10:19:05 +01:00
Amjad Alsharafi
0a8e7526f6
Fix discarding image data when transitioning StorageImage (#2150)
* Fix discarding image data when transitioning StorageImage (#2149)

* Used Relaxed ordering for `StorageImage::layout_initialized` atomic
2023-03-03 10:18:00 +01:00
marc0246
2fff56624d
Fix subbuffer alignment to the non-coherent atom size limitation (#2148)
* Fix subbuffer alignment to the non-coherent atom size limitation

* Fix incorrect range in the buffer guards

* Document the new behavior

* Simplify range aligning
2023-03-03 10:17:33 +01:00
Roy Wellington Ⅳ
52748c64bb
Minor touch-ups to the docs for PrimaryCommandBufferAbstract (#2128)
* Minor touch-ups to the docs for `PrimaryCommandBufferAbstract`

* Rewrite this passage to address the comments in #2129
2023-03-02 22:17:05 +01:00
Rua
2f7c4e94e2
#2151 changelog 2023-03-02 22:15:50 +01:00
Marvin
2781d898fd
render pass macros now allow trailing commas (#2151) 2023-03-02 22:15:25 +01:00
Sebastian Conybeare
6994ce613e
Make surface capabilities queries conform to VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671 (#2144) 2023-02-16 13:09:43 +01:00
marc0246
9b7bb8a1a5
Fix inconcistently named macros crate (#2140) 2023-02-15 14:44:33 +01:00
Rua
486cec3c62
#2136 changelog 2023-02-15 14:44:18 +01:00
Andrew
58fe067033
remove extraneous comma in shader entry point generation (#2136) 2023-02-15 14:43:02 +01:00
marc0246
a2d3d80ce1
Fix outdated SubbufferAllocatorCreateInfo docs (#2137) 2023-02-15 14:42:42 +01:00
marc0246
c2652fb66c
Add missing licence notice to the cache module (#2138) 2023-02-15 14:42:27 +01:00
marc0246
a16c3bdc0f
Re-add device-local buffer docs (#2139) 2023-02-15 14:42:09 +01:00
marc0246
140da613e3
Remove long-gone www crate from the exclude-list (#2141) 2023-02-15 14:41:30 +01:00
Austin Johnson
85e9d1c24e
#2133 Changelog 2023-01-22 01:54:48 -06:00
Rua
758151b087
Document data layout in shaders (#2133)
* Document data layout in shaders

* Marc fix

* Some rewriting, separate SPIR-V/GLSL layout from alignment rules

* Small change

* Explicitly mention the SPIR-V decorations

* Marc fix 2

* More small wording changes
2023-01-22 01:54:44 -06:00
Austin Johnson
1594b24495
Switch Windows actions to self-hosted runner (#2134)
* Switch Windows actions to self-hosted runner

* Trigger Build?

* fix runs-on
2023-01-22 01:47:27 -06:00
marc0246
0329b1c542
Fix a unit test that was not implementation-agnostic (#2135) 2023-01-21 03:38:11 -06:00
Rua
88d9d38f94
#2131 changelog 2023-01-15 15:38:51 +01:00
marc0246
046af69be5
Fix #2130 (#2131) 2023-01-15 15:37:40 +01:00
Rua
f3205183ed
Oops 2023-01-12 14:06:25 +01:00
Rua
4b2f71319f
#2127 changelog 2023-01-12 13:58:05 +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
fcb46e6f89
impl From<SampleCount> for u32 (#2125) 2023-01-07 20:38:28 -06:00
Austin Johnson
ccc50a6f9c
#2125 Changlog 2023-01-07 20:38:18 -06: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
Rua
bad402ef4f
#2119 #2122 changelog 2023-01-03 18:53:26 +01:00
marc0246
82389ae880
Optimize memory layout checks and fix allocation soundness (#2122)
* Add `DeviceLayout`, `DeviceAlignment` and `NonZeroDeviceSize`

* Replace sizes and alignments with `DeviceLayout`

* Add missing allocation type checks

* Add forgotten docs
2023-01-03 18:49:47 +01: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
Austin Johnson
21f850dc99
#2117 Changelog 2022-12-30 03:18:31 -06:00
Rua
41a37735d1
Automatically derive Pod and Zeroable for structs generated by vulkano-shaders (#2117) 2022-12-30 03:18:25 -06:00
Simon Hümmer
daa139dd53
Added Korangar to 'Projects using Vulkano' in README.md (#2116) 2022-12-30 03:16:21 -06:00
Austin Johnson
10fe6e6522
#2115 Changelog 2022-12-30 03:14:47 -06:00
Rua
f08e8767a9
Document features of each crate (#2115) 2022-12-30 03:14:43 -06:00
Austin Johnson
7fec2a6b24
#2108 Changelog 2022-12-30 03:10:40 -06:00
Rua
aabe529080
Fix incorrect aspects in barriers for depth+stencil images (#2108)
* Fix incorrect aspects in barriers for depth+stencil images

* Account for first_use possibly being empty
2022-12-30 03:10:34 -06:00
Rua
622626af80
#[allow(deprecated)] on various things related to impl_vertex (#2118) 2022-12-28 17:31:45 +01:00
Rua
cd3b9d25b3
Oops 2022-12-28 11:26:36 +01:00
Rua
d6a6ff383c
#2106 changelog 2022-12-28 11:26:10 +01: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
Austin Johnson
40fc712e65
#2107 Changelog 2022-12-21 07:51:32 -06:00
Rua
0b0c4662e9
Add more support for cgmath and nalgebra types (#2107) 2022-12-21 07:50:56 -06:00
Austin Johnson
dfdb90e9a6
Remove installation of python with Windows actions (#2109)
* Remove python3 install. Install ninja with pip.

* Run actions on all branches.

* Specify cargo jobs?

* undo last commit
2022-12-21 06:20:33 -06:00
marc0246
8ed82d246e
Optimize host pool allocator (#2112) 2022-12-20 21:51:03 +01:00
marc0246
31aa5d8316
#2110 fix (#2111) 2022-12-20 18:49:54 +01:00
marc0246
8a5dedf6a7
Replicate #2098 on master (#2110) 2022-12-20 17:55:41 +01:00
Rua
6eb526322b
Fix clippy warnings from Rust 1.66 (#2105) 2022-12-18 10:23:40 -06:00