Commit Graph

3905 Commits

Author SHA1 Message Date
Martin Charles
64f3b1e7bc
add memoryMapPlaced and memoryMapRangePlaced features of VK_EXT_map_memory_placed extension (#2514)
* add partial support for VK_EXT_map_memory_placed extension

implements the memoryMapPlaced and memoryMapRangePlaced features

* fix clippy lint

* add tests

I don't love these tests, they probably fail silently in CI

* fix conflicting requirement

* update test

* fmt

* fix memory selection in test

intersects does not do what I thought it does

* remove incorrect assertion

I don't think this is correct. The offset and size are both DeviceSize or u64. They are added together as positive numbers.

* remove unused

* put back non-range test

* only run test on unix

* wrap stuff to 100 cols

this is actually really nice for reading

* clippy

* tweak impl

* scope

* remove unused

* use NonNull

* fmt

* add flags field

* update position

* PLACED_EXT -> PLACED

* removed unnecessary validation

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* remove more

* typo

* Update vulkano/src/memory/device_memory.rs

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

* add validate_device call

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* Update vulkano/src/memory/device_memory.rs

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

* fix links

* remove extra branch

* use WHOLE_SIZE

* use getter

* fix boolean condition

* Update vulkano/src/memory/device_memory.rs

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

* add specific changes marc asked for

i've concluded that this choice is roughly semantically equivalent and this comes down to opinion. I can't be bothered to have an opinion here, imo this is a bikeshed.

also it is temporary. until the docs are updated and the impls are updated. also i don't even really care about the ranged version of this feature, implemented it mostly for completeness than anything else

* Incorporate latest spec updates

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: Rua <ruawhitepaw@gmail.com>
2024-06-07 12:00:16 +02:00
marc0246
978c922e1b
Fix latest clippy warning 2024-06-01 15:42:17 +02:00
marc0246
42e4d0b7c3
Fix shaderc dependency version
See
https://github.com/vulkano-rs/vulkano/pull/2467#issuecomment-2094935117
2024-05-05 22:17:47 +02:00
Rua
c03e2b926c
#2519 changelog 2024-04-19 13:55:23 +02:00
marc0246
bb622ea4ba
Add ResourceMemory::from_device_memory_unchecked (#2519) 2024-04-19 13:54:50 +02:00
marc0246
d7f7e49d18
#2516 changelog 2024-04-19 12:29:38 +02:00
Rua
87993aa3d7
Set MSRV to 1.72.0 (#2516)
* Set MSRV to 1.72.0

* Use workspace inheritance for some package fields

* Authors seem to differ, so don't inherit that

* Consistency
2024-04-19 12:27:26 +02:00
Martin Charles
3fb4a30a9f
fix null handling of array fields in autogen properties (#2518)
* add UnalignedSlice

* Revert "add UnalignedSlice"

This reverts commit 8bb1603ed3.

* add null check

* clippy

* rerun ci
2024-04-19 10:32:23 +02:00
Rua
7827b6b22a
#2513 changelog 2024-04-08 22:24:28 +02:00
Martin Charles
0918ac84d7
Integrate latest vk.xml changes (#2513)
* update ash

* update autogen for vk.xml updates

* add fields

* fix new clippy warning

* define enum and bitfield

didn't look at the actual type before

* comment
2024-04-08 22:22:48 +02:00
Rua
fe74e0aac8
Enable and fix pointer cast lints (#2507)
* Enable and fix pointer cast lints

* Fix for #2508

* Use coercion instead of `ptr::from_ref`

* Search-and-replace fail

* Replace `addr_of!` + `cast`
2024-04-08 20:02:56 +02:00
marc0246
18c88cd854
Changelog was borked 2024-04-07 12:40:30 +02:00
Rua
b42fc43f93
#2510 changelog 2024-04-07 12:18:51 +02:00
Marijn Suijten
77abaff2f0
Upgrade to ash 0.38 (#2510)
* Upgrade to `ash 0.38`

https://github.com/ash-rs/ash/releases/tag/0.38.0

* Clean up subpass shading -> shader pipeline stage name
2024-04-07 12:16:30 +02:00
Martin Charles
91015a5eb2
Handle arrays in autogen (#2512)
* unwrap if else

reduce nesting using early returns to make code a bit less branchy

* handle array in autogen

handles the case where a type in vk.xml has a field which is an array.

See pr description for more info.

* use reference in from_vulkan call instead of cloning

let the callee decide to whether or not to clone it if they want

* remove extra constraint

oops

* add copy blanket impl for references

* add inline
2024-04-06 17:26:58 +02:00
Martin Charles
f84479b491
Handle more depends values in vk.xml (#2511)
* add conjunctive normal form normalization

honestly, i think it might be easier to read the code if we skip all this cnf stuff and instead just keep the original boolean expression around but I don't have the context yet to comfortable making a change to both the read and write sides of the autogen

* support non-parens precedence for depends parsing

and (allof) takes precedence over or (oneof), implementing eager binding at the parser level

would be great to have tests for this to make sure its correct

* address panic formatting nit
2024-04-03 17:01:16 +02:00
Rua
55556bb916
#2508 changelog 2024-03-29 19:56:00 +01:00
Luke Powers
5dab2df966
support for ext_conservative_rasterization (#2508)
* disabled bad validation code

* conservative rasterization

* validation for conservative_rasterization

* rebuild

* extra_primitive_overestimation_size dynamic state

* safety fixed

* set builder state

* formatted

* unfixed fake bug fix

* actually unfixed fake bug fix

* fixed bad formatting

* deleted duplicate todo

* command buffer documentation

* formatted

* add vuid

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

* add vuid

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

* more validation

* Update vulkano/src/pipeline/graphics/mod.rs

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

* Update vulkano/src/pipeline/graphics/mod.rs

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

* Update vulkano/src/pipeline/graphics/mod.rs

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

* Update vulkano/src/pipeline/graphics/mod.rs

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

* put in block

* add todo

* fixed clippy

* removed redundant checks

---------

Co-authored-by: Rua <ruawhitepaw@gmail.com>
2024-03-29 19:54:44 +01:00
ComfyFluffy
78f3f9f508
Add details for error messages in validate_pipeline_descriptor_sets (#2509)
* add details in error messages for RecordingCommandBuffer::validate_pipeline_descriptor_sets

* update messages

* fix case
2024-03-29 19:18:03 +01:00
Rua
e9c650c966
Use workspace lints (#2505)
* Use workspace lints

* Use underscores for the lints, since they are canonically written that way

* Put lints after features
2024-03-28 11:58:43 +01:00
Okko Hakola
15f60f02c9
Pass timeout to acquire (#2503)
* Pass timeout to acquire

* Changelog

* Fix examples

* Switch input order
2024-03-27 22:00:56 +01:00
maratik123
93b6e9401f
Simplify VertexInputState::default() (#2502) 2024-03-23 15:34:39 +01:00
Rua
efab013e48
#2501 changelog 2024-03-23 15:33:43 +01:00
marc0246
94e4000a69
Add GenericMemoryAllocator::pools for allocation introspection (#2501)
* Add `GenericMemoryAllocator::pools` for allocation introspection

* Suballocator requires `&mut self` now

* Forgor a link
2024-03-23 15:32:41 +01:00
Michael Wu
7cbf3a7f26
Support event loops with custom user events (#2500) 2024-03-18 00:19:44 +01:00
Rua
900166707e
#2499 changelog 2024-03-16 10:55:18 +01:00
marc0246
984cbeb0c3
Add Suballocator::suballocations (#2499)
* Add `Suballocator::suballocations`

* Add missing `Send` and `Sync` impls for `free_list::Suballocations`

* Missed docs

* Strange import, what is rust-analyzer smoking
2024-03-16 10:52:51 +01:00
maratik123
f911996534
Code cleanup (#2497)
* refactoring

* fmt

* Update vulkano/src/command_buffer/commands/query.rs

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

* Update vulkano/src/buffer/subbuffer.rs

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

* Update vulkano/src/buffer/mod.rs

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

* Update vulkano/src/swapchain/mod.rs

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

* Update vulkano/src/sync/fence.rs

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

* Update vulkano/src/sync/semaphore.rs

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

* Update vulkano/src/sync/pipeline.rs

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

* Update vulkano/src/descriptor_set/mod.rs

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

* Update vulkano/src/image/mod.rs

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

* Apply suggestions from code review

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

* review fixes

* post merge fixes

* fmt

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2024-03-13 17:37:28 +01:00
Rua
25a1184c75
#2496 changelog 2024-03-13 17:06:43 +01:00
maratik123
3472daa465
PhysicalDevice::surface_present_modes should return Vec result (#2496)
* PhysicalDevice::surface_present_modes should return Vec result as any other this struct functions for consistency and to eliminate composing result back to Vec in outer usages, such as:
```rust
    let present_mode = physical_device
        .surface_present_modes(surface, SurfaceInfo::default())?
        .collect();
    Ok(SwapChainSupportDetails {
        _capabilities: capabilities,
        formats,
        present_mode,
    })
```

* fmt

* review fix
2024-03-13 17:05:17 +01:00
marc0246
87140ce3d0
Reorganize the suballocator module (#2498) 2024-03-13 11:17:33 +01:00
marc0246
64be09e290
Replace host::PoolAllocator with slabbin::SlabAllocator (#2493) 2024-03-12 19:26:16 +01:00
Rua
e62bf5d486
#2492 changelog 2024-03-08 18:45:26 +01:00
marc0246
7bba8ccca3
Refactor some braindead code in FreeListAllocator (#2492) 2024-03-08 18:44:45 +01:00
marc0246
ee0cabfa65
Fix PR template backticks 2024-03-08 18:38:10 +01:00
grego
7c8d6434d2
Fix using is_some when checking for None in render subpass valida… (#2489)
* Fix using `is_some` when checking for `None` in render subpass validation

* Fix the second occurence
2024-03-07 00:34:31 +01:00
marc0246
a4f9d9db30
#2490 changelog 2024-03-07 00:33:55 +01:00
Aspen
12c3c9dd26
add null-check for empty arrays in debug trampoline (#2490) 2024-03-07 00:32:44 +01:00
dependabot[bot]
b9f1cc3b7c
Bump mio from 0.8.10 to 0.8.11 (#2488)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 23:03:18 +01:00
marc0246
9220ae9f42
#2487 changelog 2024-03-04 23:00:34 +01:00
Rua
b190d6fb1c
Rewrite VertexDefinition (#2487) 2024-03-04 22:58:27 +01:00
marc0246
960e554ca0
#2486 changelog 2024-03-04 20:51:46 +01:00
Rua
7f5d3e6919
Add support for the ext_host_query_reset extension (#2486) 2024-03-04 20:50:25 +01:00
marc0246
19a89f3f42
Ignore the correct file #2451 creates (oops) 2024-03-04 20:37:12 +01:00
marc0246
d7d9b2825d
Ignore the file that #2451 creates 2024-03-04 20:35:11 +01:00
marc0246
0a48a64802
#2480 changelog 2024-03-04 19:57:40 +01:00
stefnotch
b34dbe9e09
Nom nom (#2480)
* Replace formats.rs and features.rs regex with nom

* Fix missing eof in format rs

* Refactor parsing logic in extensions.rs

* Replace regex in mod.rs

* Replace regex in spriv_reqs.rs

* Improve nom usage for parsing get_header_version

* Remove stray dbg

* Remove final usage of regex

* Replace tag("single character") with char(...)

* Remove unused import

* Undo my testing changes to vk.xml
(I shouldn't have committed that)

* Sort cargo toml alphabetically

* Use nom for parse_depends

* Simplify parser again

* Parser cleanup

* Inline parser logic for shorter code

Thanks to marc for suggesting this

* Fix clippy violation

* Remove useless parse prefix
2024-03-04 19:53:07 +01:00
Rua
0375be7924
#2481 changelog 2024-03-04 17:25:17 +01:00
Rua
6a5aed496e
Rename Features, Properties to DeviceFeatures, DeviceProperties (#2481)
* Rename `Features`, `Properties` to `DeviceFeatures`, `DeviceProperties`

* Merge
2024-03-04 17:24:29 +01:00
Austin Johnson
aeb7a3ada5
#2460 Changelog 2024-03-03 16:30:41 -06:00