Commit Graph

1633 Commits

Author SHA1 Message Date
XiaoPeng
3d5d7dec02 clear refs to died texture views 2024-06-26 10:18:07 +02:00
teoxoy
bfcb5457c6 remove unnecessary unsafe block 2024-06-25 11:14:41 +02:00
teoxoy
ad2d797f81 move InvalidQueueId error variant to top level error types 2024-06-25 11:14:41 +02:00
teoxoy
3005b46a29 inline ComputePass.parent_id() 2024-06-25 11:14:41 +02:00
teoxoy
f55fa6e217 make ResourceInfo.label private 2024-06-25 11:14:41 +02:00
teoxoy
a56698cbe6 use .error_ident() in a few more places 2024-06-25 11:14:41 +02:00
teoxoy
8106028f23 remove ResourceInfo.label() 2024-06-25 11:14:41 +02:00
teoxoy
c4e067b394 use .error_ident() for resource_log! in Drop impls 2024-06-25 11:14:41 +02:00
teoxoy
5f78485f30 pass Label to ResourceInfo::new 2024-06-25 11:14:41 +02:00
teoxoy
beaa6e95e4 remove duplicate label fields 2024-06-25 11:14:41 +02:00
teoxoy
bbf824767d remove IDs from Destroyed{Buffer,Texture} 2024-06-25 11:14:41 +02:00
teoxoy
d5d806a474 pass through pipeline_id instead of getting it via .as_info().id() 2024-06-25 11:14:41 +02:00
teoxoy
1b40c8c745 replace check_valid_to_use with ParentDevice.same_device checks 2024-06-25 11:14:41 +02:00
teoxoy
06da3e88d0 remove IDs from QueryResetMap 2024-06-25 11:14:41 +02:00
teoxoy
d30c02ffa3 use .error_ident() for resource logging 2024-06-25 11:14:41 +02:00
teoxoy
eeb57e1cee pass BufferId to unmap for tracing 2024-06-25 11:14:41 +02:00
teoxoy
1a4f6aca6f trace as soon as possible 2024-06-25 11:14:41 +02:00
teoxoy
fd52ec8997 remove tracing from deferred texture view and bind group destruction
we already trace texture view and bind group drop in the corresponding `Global` methods so we might end up with double drop actions
2024-06-25 11:14:41 +02:00
teoxoy
812a562331 remove tracing from Destroyed{Buffer,Texture} drop impl
we already trace buffer drop and destroy in the corresponding `Global` methods so we might end up with double drop/destroy actions
2024-06-25 11:14:41 +02:00
teoxoy
f2ea30772c move destroy/drop tracing actions in Global's methods 2024-06-25 11:14:41 +02:00
teoxoy
e2c4348959 replace .then_some(()).ok_or_else(e) with ifs 2024-06-25 11:14:41 +02:00
Andreas Reich
b4c7987aa7
Separate renderpass arc resolve & renderpass consume on end (#5794) 2024-06-25 09:37:29 +02:00
Nicolas Silva
1de04926b1
Add infrastructure for counting and reporting internal resources (#5708)
* Add an optional system for counting and reporting internal resources and events
* Count API objects in wgpu-hal
* Expose internal counters in wgpu-core and wgpu.
2024-06-24 11:20:10 +02:00
Elabajaba
35477dff9a automatically check for subgroup support when creating a naga Validator 2024-06-21 10:20:25 +02:00
teoxoy
1e784c9c0a use TrackerIndex instead of IDs in PendingWrites's fields 2024-06-20 16:34:17 +02:00
teoxoy
2e1e1cd26e inline id getters 2024-06-20 16:34:17 +02:00
teoxoy
ef2da1a6d7 rename UsageConflict to ResourceUsageCompatibilityError 2024-06-20 16:34:17 +02:00
teoxoy
5f6848eddf remove IDs from UsageConflict variants 2024-06-20 16:34:17 +02:00
teoxoy
123a59ae7b change return type of ResourceMetadataProvider.get to &Arc<T> 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
aaec1c37b9 take resource lookup out of BufferUsageScope.merge_single 2024-06-20 16:34:17 +02:00
teoxoy
f5072261c7 remove ID from QueueSubmitError::BufferStillMapped 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
08f5eb82cd introduce TextureView.try_raw 2024-06-20 16:34:17 +02:00
teoxoy
7bd9195aa2 take resource lookup out of StatelessTracker.add_single 2024-06-20 16:34:17 +02:00
teoxoy
2ec7254772 remove old comment 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
97a038a768 make return type of TextureTracker.set_single non-optional 2024-06-20 16:34:17 +02:00
teoxoy
d2218398ff take buffer lookup out of BufferBindGroupState.add_single 2024-06-20 16:34:17 +02:00
teoxoy
6a181fa634 remove IDs from StatelessBindGroupState 2024-06-20 16:34:17 +02:00
teoxoy
a979d2ed46 simplify BufferTracker.set_single's return type 2024-06-20 16:34:17 +02:00
teoxoy
862f19524f make check_texture_usage a texture method 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
068da49a4c use error_ident for log instead of ID 2024-06-20 16:34:17 +02:00
teoxoy
836f016dcd use the tracker index as key in hashmap instead of ID 2024-06-20 16:34:17 +02:00
teoxoy
0c4b449644 use Arc::ptr_eq for resource equality 2024-06-20 16:34:17 +02:00
teoxoy
a21bbdccf0 remove usage of Buffer IDs in clear code 2024-06-20 16:34:17 +02:00
teoxoy
8465a64104 remove usage of Texture IDs in clear code 2024-06-20 16:34:17 +02:00
teoxoy
2a7f09aebc make clear_texture_via_render_passes infallible (in practice it was already) 2024-06-20 16:34:17 +02:00
teoxoy
8d805c99d3 remove TextureBindGroupState.add_single's return type 2024-06-20 16:34:17 +02:00