Commit Graph
600 Commits
Author SHA1 Message Date
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
teoxoy 249c8023ff simplify State.set_bind_group 2024-07-03 15:01:41 +02:00
teoxoy dbcb273188 remove StatelessTracker.add_single 2024-07-03 15:01:41 +02:00
teoxoy 7f3e1bba14 move code after calls to FutureId.assign inside Device fns 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 9d3d4ee297 implement exclusive pipeline validation
This gets the bind_group_layout_dedup test passing again.
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 42e16c7e7d simplify logic of Entry.is_valid 2024-07-02 18:06:19 +02:00
teoxoy 0d539874ed simplify the BGL compatibility check 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 2fe761f7e3 remove MissingCopySrcUsageFlag error variant 2024-07-02 18:06:19 +02:00
teoxoy 1841857fea use .check_usage() for QUERY_RESOLVE 2024-07-02 18:06:19 +02:00
teoxoy 4df5474c9c remove MissingCopyDstUsageFlag error variants 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 f34f7eb658 impl ParentDevice via macro 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 727956fcde introduce StorageItem trait 2024-07-02 18:06:19 +02:00
teoxoy 90f7377cc9 introduce ResourceType trait 2024-07-02 18:06:19 +02:00
teoxoy a422d1cba2 remove ResourceInfo.id 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 d26aef554e use .error_ident() for log::trace! in render_pass_end 2024-07-02 18:06:19 +02:00
teoxoy fc6fe76fce trace only render_pass_end_with_unresolved_commands 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 f54b354021 use .validate_dynamic_bindings() in render bundle's set_bind_group 2024-06-27 10:20:11 +02:00
teoxoy a2c60cea4f remove render pipeline id from set render pipeline scope
and make sure that we use `ResourceErrorIdent` in all relevant inner errors
2024-06-27 10:20:11 +02:00