Teodor Tanasoaia
ef0e6f782a
deduplicate vertex buffer size validation ( #7124 )
2025-02-14 10:33:28 +01:00
sagudev
bcbe4311a5
ArcRenderPassColorAttachment
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
JMS55
0fc0b35899
Transition resources ( #6678 )
...
* WIP
* Fix typo
* WIP: Implement structure of command_encoder_transition_resources
* WIP
* More work
* Clippy
* Fix web build
* Use new types for API, more docs
* Add very basic test
* Try to fix test cfg
* Fix merge
* Missed commit
* Use wgt types instead of hal types
* Implement `Clone` for `ShaderModule` (#6939 )
* Move to dispatch trait, move more things to wgt
* Move existing code to use new wgt types
* Fixes
* Format import
* Format another file
* Fixes
* Make module private
* Fix imports
* Fix test imports
* Rexport types
* Fix imports
* Fix import
---------
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-24 00:54:19 -05:00
Connor Fitzgerald
fabcba8f9a
Refine Multi-Draw-Indirect ( #6870 )
2025-01-07 13:52:42 +01:00
Samson
ee3ae0e549
[core] Use higher level LoadOp,StoreOp ( #6785 )
2024-12-22 21:48:11 -05:00
teoxoy
a5c3be575e
remove device arg from all CommandEncoder methods
2024-12-20 15:44:15 +01:00
teoxoy
486967632c
rename close to close_if_open and add close that panics if the encoder is not open
2024-12-20 15:44:15 +01:00
teoxoy
7a476fcbf4
use open_pass in some more places
2024-12-20 15:44:15 +01:00
teoxoy
062999658a
let open_pass handle hal label mapping
2024-12-20 15:44:15 +01:00
Samson
f6fec82853
[core] Allow depthClearValue to be empty ( #6753 )
2024-12-16 16:21:06 -05:00
Samson
4da7c263ed
[core] Support optional ops in PassChannel ( #6716 )
...
* Support optional ops in PassChannel
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* respect view format aspect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-12-16 12:20:20 +01:00
Samson
8f82992b9f
Inline PassChannel into ColorAttachment ( #6704 )
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-12-12 15:57:05 +01:00
teoxoy
5e1fbd7176
move CommandEncoderStatus on the CommandBuffer and change its variants to hold CommandBufferMutable
...
This makes the code more straightforward, we were previously holding invalidity state in 2 places: `CommandBuffer::data` could hold `None` and in `CommandEncoderStatus::Error`.
This commit also implements `Drop` for `CommandEncoder` which makes the destruction/reclamation code automatic. We were previously not reclaiming all command encoders (`CommandBufferMutable::destroy` didn't call `release_encoder`) even though all encoders are coming from a pool.
2024-12-02 15:59:14 -08:00
Erich Gubler
19d80fe229
refactor(core): extract Global::validate_pass_timestamp_writes
2024-11-22 13:50:29 -05:00
Erich Gubler
29e7fe3fe2
fix(core): validate that at least one pass timestamp write index is specified
2024-11-22 13:50:29 -05:00
Erich Gubler
f1ec934dbc
fix(core): validate that begin and end indices of pass timestamp writes are not equal
2024-11-21 23:22:15 -05:00
Erich Gubler
be50bdfc18
fix(core): validate bounds of pass timestamp writes' indices
2024-11-21 23:22:15 -05:00
Erich Gubler
ce1d6e4173
refactor: destructure timestamp writes in command_encoder_create_{compute,render}_pass
2024-11-21 23:22:15 -05:00
Erich Gubler
b17c30338d
fix(core): validate TIMESTAMP_QUERY feature before other query set validation in pass creation
2024-11-21 23:22:15 -05:00
Teodor Tanasoaia
1abf3fe90e
remove unused enum variants ( #6550 )
2024-11-15 14:25:18 +01:00
Erich Gubler
5936fe58f4
fix: check for device mismatch in create_{render,compute}_pass
2024-11-06 01:33:32 -05:00
Erich Gubler
2e46a6c9c9
fix: req. TIMESTAMP_QUERY feat. for <pass desc.>::timestamp_writes
2024-11-06 01:33:32 -05:00
teoxoy
7ac533a312
add missing indirect buffer offset validation
2024-10-02 04:41:34 -04: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
c0c594eff2
[wgpu-core] use Fallible for RenderBundle
2024-09-10 11:58:54 +02:00
teoxoy
45206e553d
[wgpu-core] use Fallible for RenderPipeline
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
68e8b7d4a8
[wgpu-core] introduce Fallible and use it for Buffer (first step of invalidity internalization)
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
BlackStone1123
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
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
b0cc0d2ebc
use QuerySet.raw() instead of QuerySet.raw.as_ref().unwrap()
2024-08-13 00:55:32 +02:00
Samson
de960ccbba
Handle TooManyAttachments in wgpu-core ( #6076 )
2024-08-05 15:45:02 +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
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
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
7761b5723d
move same device checks in render_pass_end
2024-07-18 10:29:08 -04:00
teoxoy
b68966eea5
[wgpu-core] use the view's format not the texture's format
...
This fixes a regression introduced in 0a76c0fa84e5e8c10c62f0a19fb54b65c0a4f6e2.
2024-07-10 15:23:31 +02:00