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
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
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
bea9a10f90
fold ComputePassTimestampWrites & RenderPassTimestampWrites and make PassTimestampWrites usable with DynQuerySet
2024-08-14 17:34:11 +02:00
teoxoy
b0cc0d2ebc
use QuerySet.raw() instead of QuerySet.raw.as_ref().unwrap()
2024-08-13 00:55:32 +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
Nicolas Silva
9c6ae1beae
Log spring cleaning ( #6065 )
...
Remove unused logs in wgpu-core and wgpu-hal
2024-07-31 16:24:23 +00:00
teoxoy
2f7860b6e4
move same device check in compute_pass_end_impl
2024-07-18 10:29:08 -04:00
teoxoy
e26d2d7763
move command buffer resolving in Global's methods
2024-07-03 15:01:41 +02:00
teoxoy
69b44c6a32
gate fns behind either serde or replay since Firefox needs those
2024-07-02 18:06:19 +02:00
teoxoy
c4d71d9af5
use Registry.get() instead of Registry.read().get_owned()
2024-07-02 18:06:19 +02:00
teoxoy
3547138716
remove PrettyError
2024-07-02 18:06:19 +02:00
teoxoy
df7a6defa8
don't print the scope twice
...
The scope is already printed by the Display impl of those errors.
2024-07-02 18:06:19 +02:00
teoxoy
4a19ac279c
introduce MultiError and use it for BGL incompatibility errors
2024-07-02 18:06:19 +02:00
teoxoy
9ec0f45efd
move the BGL compatibility check in the binder
2024-07-02 18:06:19 +02:00
teoxoy
a4bb5dff2b
rename error variants that contain IDs
2024-07-02 18:06:19 +02:00
teoxoy
c3ebfde302
remove Resource trait
2024-07-02 18:06:19 +02:00
teoxoy
c63f0a02f2
introduce Trackable trait
2024-07-02 18:06:19 +02:00
teoxoy
ae7da8f669
introduce Labeled trait
2024-07-02 18:06:19 +02:00
teoxoy
66777cc80d
remove PassErrorScope::PassEncoder and id arg of PassErrorScope::Pass
2024-07-02 18:06:19 +02:00
teoxoy
981db9be33
trace only compute_pass_end_with_unresolved_commands
2024-07-02 18:06:19 +02:00
Andreas Reich
0a76c0fa84
Renderpass take resource ownership ( #5884 )
...
* share timestamp write struct
* Make name of set_push_constants methods consistently plural
* remove lifetime bounds of resources passed into render pass
* first render pass resource ownership test
* introduce dynrenderpass & immediately create ArcCommands and take ownership of resources passed on pass creation
* Use of dynrenderpass in deno
* Separate active occlusion & pipeline statitics query
* resolve render/compute command is now behind `replay` feature
* add vertex & index buffer to ownership test
* test for pipeline statistics query
* add occlusion query set to pass resource test
* add tests for resource ownership of render pass query timestamps
* RenderPass can now be made 'static just like ComputePass. Add respective test
* Extend encoder_operations_fail_while_pass_alive test to also check encoder locking errors with render passes
* improve changelog entry on lifetime bounds
2024-07-01 18:36:24 +02:00
teoxoy
92c8cf415c
remove bind group id from set bind group scope
...
and make sure that we use `ResourceErrorIdent` in all relevant inner errors
2024-06-27 10:20:11 +02:00
teoxoy
ab1fa7d96e
remove compute pipeline id from set compute pipeline scope
...
and make sure that we use `ResourceErrorIdent` in all relevant inner errors
2024-06-27 10:20:11 +02:00
teoxoy
d0e63c5c05
move pipeline ident to DispatchError::IncompatibleBindGroup
2024-06-27 10:20:11 +02:00
teoxoy
f0f61d9bb6
move the raw encoder in State
2024-06-27 10:20:11 +02:00
teoxoy
8ee9df9eb3
move same device check and tracker insertion inside validate_and_begin_pipeline_statistics_query
2024-06-27 10:20:11 +02:00
teoxoy
e41cfbf1c2
extract write_timestamp from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
3ff680261d
extract insert_debug_marker from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
f609e82055
extract pop_debug_group from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
c72af7b57f
extract push_debug_group from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
868b9cd866
extract dispatch_indirect from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
fefb9c2453
extract dispatch from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
5fdb663f45
extract set_push_constant from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
3a199cf258
extract set_pipeline from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
bc2f8edf9b
extract set_bind_group from compute_pass_end_impl
2024-06-27 10:20:11 +02:00
teoxoy
9b4bb8b594
remove CommandBuffer.limits
2024-06-27 10:20:11 +02:00
teoxoy
d3eed4920b
put all state in State
2024-06-27 10:20:11 +02:00
teoxoy
6db9ceede1
inline pipeline.as_info().id()
2024-06-27 10:20:11 +02:00
teoxoy
3005b46a29
inline ComputePass.parent_id()
2024-06-25 11:14:41 +02:00
teoxoy
ef2da1a6d7
rename UsageConflict to ResourceUsageCompatibilityError
2024-06-20 16:34:17 +02:00
teoxoy
26eceabe86
move body of BufferUsageScope.insert_merge_single in BufferUsageScope.merge_single
2024-06-20 16:34:17 +02:00
teoxoy
b0d2517bf4
change BindGroup.raw to BindGroup.try_raw
2024-06-20 16:34:17 +02:00
teoxoy
a024afe182
consolidate destroyed texture/buffer errors and separate them from invalid ID errors
2024-06-20 16:34:17 +02:00
teoxoy
87382d7133
make check_buffer_usage a buffer method
2024-06-20 16:34:17 +02:00
teoxoy
edc2cd9615
introduce Device.check_is_valid
2024-06-19 14:05:18 +02:00
teoxoy
ce716adb5e
improve device mismatch errors
2024-06-19 11:15:38 +02:00
teoxoy
adfb183dc0
move same device validation in compute_pass_end_impl
2024-06-19 11:15:38 +02:00