teoxoy
8ba5c82831
minimize moves by introducing WeakVec
2024-10-18 17:24:52 +02:00
Teodor Tanasoaia
7f708edd1f
Ensure safety of indirect dispatch ( #5714 )
...
by injecting a compute shader that validates the content of the indirect buffer
2024-10-14 15:02:01 +02:00
teoxoy
e86330977b
remove parent_id field of TextureInner::Surface
...
The `parent_id` will always match `surface_id` because we got the texture from the `acquired_texture` field.
2024-10-14 13:24:44 +02:00
teoxoy
c65c4626f1
make Fallible<T> public
2024-10-14 13:24:44 +02:00
teoxoy
38a13b94f0
refactor: make Snatchable::snatch take _guard by &mut _
2024-10-02 04:41:34 -04:00
Adam Winiarczuk and Adam Winiarczuk
f3cbd6ce54
fix: Set mip_level_count in TextureInitTracker for externally created textures ( #6249 )
...
Co-authored-by: Adam Winiarczuk <tsu@liv.tv >
2024-09-10 22:28:36 +00:00
teoxoy
ac74f36590
[wgpu-core] rename .strict_get() to .get()
2024-09-10 11:58:54 +02:00
teoxoy
31edbfd0dc
[wgpu-core] use .strict_get() & .strict_unregister() for command buffers
...
We now only rely on the presence of the inner `CommandBufferMutable` to determine if command buffers are invalid.
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
3437589107
[wgpu-core] use .strict_get() & .strict_unregister() for devices
...
This works because we never assign errors to devices (they are never invalid).
2024-09-10 11:58:54 +02:00
teoxoy
da9afea271
[wgpu-core] use .strict_get() & .strict_unregister() for surfaces
...
This works because we never assign errors to surfaces (they are never invalid).
2024-09-10 11:58:54 +02:00
teoxoy
98426329a4
[wgpu-core] introduce Registry .strict_get() & .strict_unregister() and use them for adapters
...
This works because we never assign errors to adapters (they are never invalid).
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
Jim Blandy
9d24406d29
[core] Simplify self types in device::resource.
...
Change various functions that have no need to create an owning
reference to the `Device` to accept `&self` instead of `&Arc<Self>`.
Change `ParentDevice::same_device` to accept `&Device` as the point of
comparison, not `&Arc<Device>`. Call sites will use Deref conversion,
so no callers need to be changed.
2024-09-03 12:33:02 -04: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
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
c1bc0864c5
use ManuallyDrop for remaining resources
2024-08-13 00:55:32 +02: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
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
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
76f9b2f87a
use ManuallyDrop for Destroyed{Buffer,Texture}
2024-07-29 17:31:24 +02: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
sagudev
fc87033b30
Make BufferAccessError (de)serializable
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2024-07-19 13:37:57 -04:00
Connor Fitzgerald
3c3b532cf3
Remove latest_submission_index ( #5976 )
...
* Remove latest_submission_index
* CI
* Comments
2024-07-18 16:43:39 +00:00
teoxoy
9a0adefe88
use ManuallyDrop instead of Option for PendingWrites
2024-07-18 10:30:11 -04:00
teoxoy
77e45d46df
add missing device valid check in create_texture_view
2024-07-18 10:29:08 -04:00
Jim Blandy
2bc328c46f
[hal, core] Introduce wgpu_hal::AtomicFenceValue, and use it.
...
Introduce the new type alias `wgpu_hal::AtomicFenceValue`, which is
the atomic version of `wgpu_hal::FenceValue`. Use this type alias in
`wgpu_core`. Remove `as` conversions made unnecessary since we're not
conflating `usize` with `u64` any more.
2024-07-17 16:11:04 -07:00
teoxoy
6f16ea460a
make the StagingBuffer implementation more robust
2024-07-12 16:33:57 +02:00
teoxoy
347d902bcb
introduce FlushedStagingBuffer
2024-07-12 16:33:57 +02:00
teoxoy
2f282cdd06
remove instance_flags arg from StagingBuffer::new
2024-07-12 16:33:57 +02:00
teoxoy
26f65ddffd
[wgpu-hal] remove return type from Device.unmap_buffer()
...
It's already documented that to unmap a buffer it has to have been mapped.
Vulkan was the only backend that was returning an OOM on missing `Buffer.block` but `Buffer.map_buffer` already returns an error in this case.
2024-07-12 16:33:57 +02:00
teoxoy
5e2df1406d
use StagingBuffer.flush() in Buffer.unmap_inner()
...
We should have always unmapped the staging buffer as we are using it on the GPU after this point.
2024-07-12 16:33:57 +02:00
teoxoy
9a7f44bf09
make StagingBuffer creation a method
2024-07-12 16:33:57 +02:00
teoxoy
4d285d8b61
remove the Mutex around StagingBuffer's internal buffer
2024-07-12 16:33:57 +02:00
teoxoy
a0c185a28c
[wgpu-core] fix trying to create 0 sized staging buffers when creating mapped_at_creation buffers
...
This issue was introduced by fabbca294a .
2024-07-11 14:10:22 +02:00
teoxoy
f5a4489fd9
don't call drain_transitions() of we drop the results
2024-07-09 10:48:52 +02:00
teoxoy
3142e15907
remove the triage suspected machinery
2024-07-09 10:48:52 +02:00
teoxoy
c6761bdd7a
add ActiveSubmission.temp_resources that contains all temporary resources.
...
It's worth noting that `suspected_resources` never contained those resources.
2024-07-09 10:48:52 +02:00
teoxoy
7223bfa88d
remove Arcs around TempResource variants
2024-07-09 10:48:52 +02:00
teoxoy
fabbca294a
use StagingBuffer instead of Buffer for mapped_at_creation Buffers
2024-07-09 10:48:52 +02:00
teoxoy
40022c1584
remove duplicate check, it's already present in Device.create_texture_view
2024-07-03 15:01:41 +02:00