Commit Graph

1881 Commits

Author SHA1 Message Date
Erich Gubler
fac49ee97c chore: work around unused_qualifications from new prelude items in Rust 1.80
`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](https://github.com/rust-lang/rust/pull/123168/).
However, we don't have an MSRV at 1.80 or higher yet. So, let's work
around it by importing these items fully. Since neither `clippy` nor
`rustc` lint against shadowed `prelude` items yet (see also a [proposed
`clippy` lint] for such), that lets us remove the explicit `std::mem::*`
imports later at our leisure.

[proposed `clippy` lint]: https://github.com/rust-lang/rust-clippy/issues/8439
2024-08-23 16:20:34 -04:00
Erich Gubler
754ead25ab chore: resolve wgt::Backend::Empty raising unused_qualifications 2024-08-23 16:20:34 -04:00
Marijn Suijten
a157c3cf4b
[wgpu-hal] Migrate d3d12 backend over to windows-rs (#5956)
* windows-rs 0.58

* Clean up suspicious committed allocation workaround

* dx12: Flatten suballocation module
2024-08-20 11:48:37 -04:00
Kornel
222f1ea733 Reduce code size of error handling 2024-08-19 14:38:20 +01:00
teoxoy
2c31414517 add an Unexpected variant to DeviceError 2024-08-15 13:56:05 +01:00
Andreas Reich
ab17d29237 re-enable docs for wgpu-core 2024-08-14 17:34:11 +02:00
Andreas Reich
0fb772b5df remove dyn render & compute pass 2024-08-14 17:34:11 +02:00
Andreas Reich
0287eaf022 Remove gfx_select. 2024-08-14 17:34:11 +02:00
Andreas Reich
9794f33823 Handle webgl's queue_copy_external_image_to_texture 2024-08-14 17:34:11 +02:00
Andreas Reich
1bfe8845d5 ignore 'arc instead of rc' warnings on wasm 2024-08-14 17:34:11 +02:00
Andreas Reich
24498f04d4 The second unraveling: hub and all types on it are generic free!
gfx_select macros are empty husks now that are waiting to be removed
2024-08-14 17:34:11 +02:00
Andreas Reich
3181251577 Core adapter no longer uses any generics 2024-08-14 17:34:11 +02:00
Andreas Reich
04cadfb369 Core's Surface, Instance and Adapter use now dynamic hal types 2024-08-14 17:34:11 +02:00
Andreas Reich
7c7e4164f1 The big unraveling: core device now has a boxed DynDevice, ripple effects from there leading to boxing of almost all hal resources 2024-08-14 17:34:11 +02:00
Andreas Reich
276753f963 DynDevice create/destroy bind group
bindgroup fixup
2024-08-14 17:34:11 +02:00
Andreas Reich
39b408218f implement transition_textures for DynCommandEncoder 2024-08-14 17:34:11 +02:00
Andreas Reich
a47a0cb3d9 render/compute pass descriptors work now with dyn types 2024-08-14 17:34:11 +02:00
Andreas Reich
bea9a10f90 fold ComputePassTimestampWrites & RenderPassTimestampWrites and make PassTimestampWrites usable with DynQuerySet 2024-08-14 17:34:11 +02:00
Andreas Reich
a4d9d38d03 BufferBarrier no longer depend on hal api struct, but directly on buffer type 2024-08-14 17:34:11 +02:00
Andreas Reich
cda9d9af65 Buffer bindings no longer depend on hal api struct, but directly on buffer type 2024-08-14 17:34:11 +02:00
Samson
c6a3d92734
Rg11b10Float -> Rg11b10UFloat and deduplicate entries in TEXTURE_FORMAT_LIST (#6108)
* Resync `TEXTURE_FORMAT_LIST` to match `TextureFormat`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* `Rg11b10Float` -> `Rg11b10UFloat`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Add changelog entry

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-08-13 08:28:55 +00:00
Erich Gubler
b1eb6db8cd refactor: satisfy clippy::manual_bits 2024-08-13 08:42:41 +01:00
teoxoy
c72bc7b84b remove unnecessary RwLock from Texture.clear_mode 2024-08-13 00:55:32 +02:00
teoxoy
1aaaec22f6 use ManuallyDrop for texture views of TextureClearMode 2024-08-13 00:55:32 +02:00
teoxoy
ce9c9b76f6 remove Option around A::SurfaceTexture
We can rely on the snatching mechanism to take the surface texture.
2024-08-13 00:55:32 +02:00
teoxoy
19843c9c5f use ManuallyDrop for Device.fence 2024-08-13 00:55:32 +02:00
teoxoy
728b288fda use ManuallyDrop for Device.zero_buffer 2024-08-13 00:55:32 +02:00
teoxoy
c1bc0864c5 use ManuallyDrop for remaining resources 2024-08-13 00:55:32 +02:00
teoxoy
b0cc0d2ebc use QuerySet.raw() instead of QuerySet.raw.as_ref().unwrap() 2024-08-13 00:55:32 +02:00
teoxoy
cf5706c24b use Device.raw() instead of Device.raw.as_ref().unwrap() 2024-08-13 00:55:32 +02:00
teoxoy
a6bc2f6f53 fix check for flush_mapped_ranges in map_buffer
`flush_mapped_ranges` needs to be called when mappings are not coherent.
We can also omit flushing for write-mapped buffers since we always flush them on unmap.
2024-08-12 14:20:56 +01:00
teoxoy
f0875e8fda remove Buffer.sync_mapped_writes
`zero_init_needs_flush_now` was always equal to `mapping.is_coherent`
which is not correct but is fixed by the next commit.
2024-08-12 14:20:56 +01:00
teoxoy
5617f0fd17 call flush_mapped_ranges when unmapping write-mapped buffers
I'm not sure how things worked without this.
2024-08-12 14:20:56 +01:00
Teodor Tanasoaia
94f54b3dc8
Add a separate pipeline constants error (#6094) 2024-08-12 09:20:36 +02:00
Mehmet Oguz Derin
34b0df277c
Support texture-compression-bc-sliced-3d in wgpu (#5751) 2024-08-10 12:02:29 +02:00
teoxoy
f6a3eef77e change Device.create_shader_module to return an Arc<ShaderModule<A> 2024-08-08 18:49:52 +02:00
teoxoy
d8b1c5788a change Device.create_command_encoder to return an Arc<CommandBuffer<A> 2024-08-08 18:49:52 +02:00
teoxoy
9ce1772f8e change Device.create_pipeline_cache to return an Arc<PipelineCache<A> 2024-08-08 18:49:52 +02:00
teoxoy
47465ddb1c change Device.create_pipeline_layout to return an Arc<PipelineLayout<A> 2024-08-08 18:49:52 +02:00
teoxoy
36c998a558 change Device.create_bind_group_layout to return an Arc<BindGroupLayout<A> 2024-08-08 18:49:52 +02:00
teoxoy
781b54a8b9 remove TrackingData from resources that are not tracked 2024-08-08 14:42:13 +02:00
teoxoy
09cc4d211b remove Labeled supertrait of Trackable
This is no longer needed since 9c6ae1beae removed the usages.
2024-08-08 14:42:13 +02:00
teoxoy
8c7c5c4974 decouple device and queue IDs
Devices and queues can have different lifetimes, we shouldn't assume that their IDs match.
2024-08-05 15:46:12 +02:00
Samson
de960ccbba
Handle TooManyAttachments in wgpu-core (#6076) 2024-08-05 15:45:02 +02:00
teoxoy
7b4cbc2619 add comments in BindGroupStates.optimize 2024-08-03 11:58:14 +02:00
teoxoy
4e777bd0e7 merge the texture and texture view trackers of BindGroupStates 2024-08-03 11:58:14 +02:00
teoxoy
62af9d78b5 rename {Buffer,Texture}BindGroupState's add_single to insert_single
Also change it's definition to take an owned `Arc`. This makes these functions consistent with the other trackers.
2024-08-03 11:58:14 +02:00
teoxoy
826e3716e5 remove all internal RenderBundleScope RwLocks 2024-08-03 11:58:14 +02:00
teoxoy
5cb1be63aa refactor the StatelessTracker to hold a Vec of Arcs
Also removes the `StatelessBindGroupState` since it does the same thing.
2024-08-03 11:58:14 +02:00
teoxoy
a3142ade91 don't optimize BindGroupStates.{views,samplers}
The resources inside `StatelessBindGroupState` are never merged with any other tracker.
2024-08-03 11:58:14 +02:00