teoxoy
82ce2ea747
[wgpu-core] use Fallible for ComputePipeline
2024-09-10 11:58:54 +02:00
teoxoy
b42500ee40
[wgpu-core] use Fallible for BindGroup
2024-09-10 11:58:54 +02:00
teoxoy
b14fe14e88
[wgpu-core] use Fallible for QuerySet
2024-09-10 11:58:54 +02:00
teoxoy
04f17d4197
[wgpu-core] use Fallible for TextureView
2024-09-10 11:58:54 +02:00
teoxoy
c630821f1d
[wgpu-core] use Fallible for Texture
2024-09-10 11:58:54 +02:00
teoxoy
68e8b7d4a8
[wgpu-core] introduce Fallible and use it for Buffer (first step of invalidity internalization)
2024-09-10 11:58:54 +02:00
teoxoy
70a9c01b48
[wgpu-core] make the Registry generic over T: Clone
2024-09-10 11:58:54 +02:00
teoxoy
d550342f47
[wgpu-core] use device.instance_flags when possible
2024-09-10 11:58:54 +02:00
teoxoy
eb47449eb9
invalidate the device when we encounter driver-induced device loss or on unexpected errors
2024-09-09 15:03:19 +02:00
Brad Werth
9b36a3e129
Make bind group an Option for set_bind_group calls. ( #6216 )
...
This is just an API change for all the "set_bind_group" calls. Calls
that pass a Some() argument should have unchanged behavior. The None
cases are left as TODOs.
2024-09-06 14:29:09 -07:00
Erich Gubler
0e352f5b34
Resolve lints for Rust 1.78-1.81 that can be preempted before upgrade ( #6225 )
...
* chore: remove `Context` methods detected as dead code
This is detected by `rustc` as of Rust 1.79.0.
* refactor: satisfy `clippy::manual_inspect`
Detected as of Rust 1.81.0.
* refactor: satisfy `clippy::needless_borrows_for_generic_args`
Detected as of Rust 1.81.0.
* refactor: suppress false-positive `dead_code` lint for `SubmissionIndex`
* chore: eliminate `dead_code` when `target_os = "emscripten"`
2024-09-06 11:55:22 +02:00
Jim Blandy
36124b12c5
[core] Update docs for private items. ( #6219 )
...
Make `cargo doc --document-private-items` work again in wgpu-core.
2024-09-05 10:15:27 +02:00
BlackStone1123 and Jasper Wu
8eb0e6451b
fix wrong count buffer id ( #6194 )
...
Co-authored-by: Jasper Wu <wuq141@vanke.com >
2024-09-02 11:37:37 +00:00
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
Andreas Reich
0fb772b5df
remove dyn render & compute pass
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
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
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
teoxoy
c72bc7b84b
remove unnecessary RwLock from Texture.clear_mode
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
728b288fda
use ManuallyDrop for Device.zero_buffer
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
d8b1c5788a
change Device.create_command_encoder to return an Arc<CommandBuffer<A>
2024-08-08 18:49:52 +02:00
Samson
de960ccbba
Handle TooManyAttachments in wgpu-core ( #6076 )
2024-08-05 15:45:02 +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
14170fd963
remove unused RenderBundleScope.query_sets
2024-08-03 11:58:14 +02:00
teoxoy
f19217479d
remove Tracker.add_from_render_bundle
...
The render bundle resources are already kept alive by the render bundle itself, there is no need to add them.
2024-08-03 11:58:14 +02:00
Nicolas Silva
9c6ae1beae
Log spring cleaning ( #6065 )
...
Remove unused logs in wgpu-core and wgpu-hal
2024-07-31 16:24:23 +00:00
Samson
7462754bde
Remove 'de: 'static" serde bound and replace &'static str with Cow in some errors ( #6048 )
...
* Remove `serde(bound(deserialize = "'de: 'static"))` and replace `&'static str` with `Cow` in deser errors
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
* Allow `clippy::result_large_err`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2024-07-29 09:07:26 +02:00
teoxoy
03f6d24ea6
deduplicate derived BGLs
2024-07-25 18:15:29 +02:00
Samson
2897fb58db
Error instead of panic in check bind ( #6012 )
...
Removed zipping of binding entries introduced in 4a19ac279c (to make sure binding numbers actually match) and add unknown error for fallback.
2024-07-24 17:50:18 +02:00
teoxoy
205f1e3ab6
[wgpu-core] fix length of copy in queue_write_texture #2
...
Follow-up to 6f16ea460a & 7e112ca4c0 .
2024-07-22 12:25:07 +02:00
Bruce Mitchener
20973d1cdc
Fix profiling with tracy. ( #5988 )
...
The profiling APIs require a `&str`, but since the label here
is now an `Option<String>`, we must get a `&str` from it.
2024-07-19 00:56:16 -04:00
teoxoy
63303d4b4e
add missing same device checks
2024-07-18 10:29:08 -04:00
teoxoy
2f7860b6e4
move same device check in compute_pass_end_impl
2024-07-18 10:29:08 -04:00
teoxoy
7761b5723d
move same device checks in render_pass_end
2024-07-18 10:29:08 -04:00
teoxoy
ef0ce05d3a
[wgpu-core] fix .zip() usages
2024-07-10 16:42:35 +02:00
teoxoy
b68966eea5
[wgpu-core] use the view's format not the texture's format
...
This fixes a regression introduced in 0a76c0fa84 .
2024-07-10 15:23:31 +02:00
teoxoy
425526828f
introduce DeviceTextureTracker which holds weak references to textures
2024-07-09 10:48:52 +02:00
teoxoy
aa9cb71a54
introduce DeviceBufferTracker which holds weak references to buffers
2024-07-09 10:48:52 +02:00
teoxoy
152a7e7dd0
remove unnecessary PhantomData
2024-07-09 10:48:52 +02:00
teoxoy
0e1c1f7c07
replace the tracker in Device with a new DeviceTracker
2024-07-09 10:48:52 +02:00
Erich Gubler
d41b9ab29f
refactor: use built-in {integer}::power_of_two methods ( #5909 )
2024-07-04 23:34:19 -04:00
teoxoy
e26d2d7763
move command buffer resolving in Global's methods
2024-07-03 15:01:41 +02:00
teoxoy
4f6223534f
take guard to render bundles at the top of resolve_render_command_ids
2024-07-03 15:01:41 +02:00
teoxoy
addd80ccd3
replace Registry.read().get_owned() with Registry.get()
2024-07-03 15:01:41 +02:00
teoxoy
9308e15048
use Storage.get_owned in cases where we used to later clone the resource anyway
2024-07-03 15:01:41 +02:00