Commit Graph
208 Commits
Author SHA1 Message Date
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
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 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
teoxoy 400372ff57 remove buffer id from set index/vertex buffer scopes
all relevant inner errors already print the label of the buffers
2024-06-27 10:20:11 +02:00
teoxoy 287d8ee414 move pipeline ident to appropriate errors 2024-06-27 10:20:11 +02:00
teoxoy 83a8699be7 remove multi_draw_indirect2 2024-06-27 10:20:11 +02:00
teoxoy 3dcd5ab422 move comment that was preventing fmt from running 2024-06-27 10:20:11 +02:00
teoxoy ebb930e9fd add more fields to State and cleanup fn params 2024-06-27 10:20:11 +02:00
teoxoy 9791b6ccb9 extract render bundle command processing into their own functions 2024-06-27 10:20:11 +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 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 f2ea30772c move destroy/drop tracing actions in Global's methods 2024-06-25 11:14:41 +02:00