Commit Graph
224 Commits
Author SHA1 Message Date
Connor Fitzgerald 5203e4386e v26: Re-use memory in render pass encoding 2025-11-10 09:15:46 -05:00
Connor Fitzgerald a248b8caf3 [core] Add RawResourceAccess trait 2025-07-09 18:08:11 -04:00
Andy Leiserson 9834d9a446 Revert "Validate binding ranges against buffer size"
This reverts commit ef428fcab8.
2025-07-09 16:29:41 -04:00
Andy Leiserson b0527800a1 Revert "Restore unintentional support for zero-size buffers"
This reverts commit c0a580d6f0.
2025-07-09 16:29:41 -04:00
Andy Leiserson c0a580d6f0 Restore unintentional support for zero-size buffers 2025-07-08 14:45:12 -07:00
Andy Leiserson ef428fcab8 Validate binding ranges against buffer size 2025-07-08 14:45:12 -07:00
Erich Gubler 964c5bbf4c feat(core): impl WebGpuError for API errors 2025-06-30 10:58:56 -04:00
Vecvec afa96af76f Unify set push constants. 2025-06-30 15:00:46 +02:00
Vecvec 4d36a02691 Unify set bind group. 2025-06-30 15:00:46 +02:00
Andy Leiserson 09c08037c9 Add a field in BasePass to store errors 2025-06-26 15:39:53 -07:00
Andy Leiserson 24f779696b Tweak MapPassErr to work for both errors and results (#7780) 2025-06-10 10:26:36 -07:00
teoxoy 7d15c511de move indirect validation code to its own folder
rename items appropriately
internalize indirect buffer bind groups
2025-03-26 18:26:31 +00:00
teoxoy ef622c1061 validate multi draw indirect calls 2025-03-26 18:26:31 +00:00
teoxoy 0285e60984 Replace the indirect-validation feature with InstanceFlags::VALIDATION_INDIRECT_CALL.
With the only caveat that device creation will now panic if the `wgsl` feature is not enabled, `InstanceFlags::VALIDATION_INDIRECT_CALL` is set and the device supports `DownlevelFlags::INDIRECT_EXECUTION`.
2025-03-26 18:26:31 +00:00
teoxoy 53c2d15e0b implement indirect draw validation 2025-03-26 18:26:31 +00:00
Erich Gubler 8774ab53d5 chore: remove std::mem::* imports now unnecessary with CORE_MSRV
`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/).
2025-02-26 22:58:50 -05:00
Kevin Reid 7bcbfe0712 wgpu-core: Adjust imports to allow no_std.
Dependencies on `std` that still exist:
* Locks
* `std::error::Error` (waiting for Rust 1.81)
* `std::os::raw::c_char` for FFI
* `thread_local` and `Backtrace` in `snatch`
2025-02-21 08:47:16 +01:00
Teodor Tanasoaia ef0e6f782a deduplicate vertex buffer size validation (#7124) 2025-02-14 10:33:28 +01:00
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
VecvecandConnor Fitzgerald 0b2c9e4f4b [Ray-tracing] Change index offset to first index (#6873)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-14 16:56:24 -05:00
Connor Fitzgerald fabcba8f9a Refine Multi-Draw-Indirect (#6870) 2025-01-07 13:52:42 +01:00
fyellin 2389106a75 Fix set_push_constants for render bundles (#6540) 2024-11-19 11:12:21 +01:00
Erich Gubler 9977edc51f chore!: remove #[no_mangle] … extern "C" … from fns in bundle_ffi (#6272) 2024-09-21 16:33:13 +00:00
teoxoy ac74f36590 [wgpu-core] rename .strict_get() to .get() 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 68e8b7d4a8 [wgpu-core] introduce Fallible and use it for Buffer (first step of invalidity internalization) 2024-09-10 11:58:54 +02:00
teoxoy 70a9c01b48 [wgpu-core] make the Registry generic over T: Clone 2024-09-10 11:58:54 +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
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 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 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 826e3716e5 remove all internal RenderBundleScope RwLocks 2024-08-03 11:58:14 +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 14170fd963 remove unused RenderBundleScope.query_sets 2024-08-03 11:58:14 +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 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 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 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