Commit Graph
287 Commits
Author SHA1 Message Date
Teoxoy ab33a724dc [wgpu-core] add query set initialization tracking
Vulkan, D3D12 and Metal require slots of query sets to
have been written prior to resolving them into a buffer.
2026-06-17 11:53:01 -07:00
teoxoy d830aab910 add close_and_insert_at to InnerCommandEncoder 2026-06-17 11:53:01 -07:00
teoxoy a1b646243d converge on a single VertexState impl for both render passes and
render bundles

- render passes now defer setting vertex buffers to the start of a draw
  command (same as bundles)
- render bundles now cache vertex/instance limit calculations when
  setting the pipeline or when setting a vertex buffer (same as passes)
2026-04-14 17:20:15 -07:00
Genna Wingert 2ac1faef05 feat(core): Add ComputePass::transition_resources (#9371) 2026-04-09 09:42:55 -04:00
Kristoffer Søholm fd04edc0ac Fix bad debug_assert in dx12 indirect multi draw (#9332) 2026-03-31 13:46:25 -04:00
Niklas EickerandConnor Fitzgerald 62c2f5da97 Move ordered usages to hals (#8924)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-03-15 03:23:32 +00:00
Andy Leiserson d152e7369b Reduce binary bloat from error vtables (#9149) 2026-03-04 08:52:24 -08:00
Andy Leiserson 1481b23e55 Clean up imports/exports in wgpu_core::command (#8836) 2026-01-09 12:23:34 -08:00
Andy Leiserson e412592b23 Store failed commands in traces 2026-01-09 15:55:33 +01:00
SuchAFuriousDeath 490f1f4153 fix(core): set is_open only after begin_encoding succeeds (#8765) 2025-12-22 17:59:12 -05:00
Connor Fitzgerald e52e8336b0 Bring immediate api in line with spec (#8724) 2025-12-16 13:13:09 +01:00
Connor Fitzgerald 5895de82b5 Rename push constants to immediates (#8586) 2025-12-01 15:20:02 +01:00
ad0f3111b7 Add multiview limits and tests (#8206)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Magnus <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-11-01 12:08:15 +00:00
Kevin Reid 5633ae8649 Show command encoder label in validation errors.
The plumbing to get it out of `wgpu_core` is awkward but I didn’t see
a clearly better option. I think it would make sense to have something
like `Global::get_label<T>(id: Id<T>) -> String` but that looks like a
lot more work.
2025-10-31 13:03:55 -04:00
Andy Leiserson 07ce023cf1 Replay traces with pointers as IDs 2025-10-30 13:52:58 +01:00
Andy Leiserson e584f382e0 Store pointers instead of IDs when tracing (1/2)
This updates pass operations.

The trace player is temporarily broken.
2025-10-30 13:52:58 +01:00
Andy Leiserson 5798a443d2 Add ReferenceType trait for command structures
Use it to deduplicate some `Foo` / `ArcFoo` / `TraceFoo` definitions.
2025-10-30 13:52:58 +01:00
Andy Leiserson d575c0234b Disallow mixing the raw encoding API with the wgpu API (#8373) 2025-10-22 11:34:40 -04:00
Andy Leiserson 3f7dae1a30 Additional api_logging for passes (#8326) 2025-10-13 13:19:29 -04:00
Andy Leiserson 3958790a85 refactor: Split finish between Global and CommandEncoder (#8288) 2025-10-09 15:13:45 +02:00
Andy LeisersonandAndreas Reich 1967900565 Encode commands on finish (#8220)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-09-25 14:22:51 -04:00
Andy Leiserson 04a3401638 Extract command encoding to free functions (#8210) 2025-09-11 15:15:33 -04:00
Andy Leiserson 67bdd80a38 Add cbindgen:ignore directives (#8212) 2025-09-11 19:10:05 +00:00
Andy Leiserson aaf52e93d9 Move some *Copy*Info types out of wgpu_core::command::transfer
In the future `transfer` will want to use the `Arc` versions of these
types. I have exported them from `wgpu_core::command::ffi`, to document
that these are used for FFI purposes, and from `wgpu_core::command`, for
backwards compatibility, although I also change the in-tree uses to
use them from `wgpu_types` instead of from `wgpu_core::command`.
2025-09-11 10:20:03 -07:00
Andy Leiserson d79a49a060 Rename commands to trace_commands 2025-09-11 10:20:03 -07:00
Andy Leiserson 718497356c Move enum Command from device::trace to command::encoder_command. 2025-09-11 10:20:03 -07:00
Andy Leiserson c0c16078e9 Rename and relocate ID resolution helpers 2025-09-11 10:20:03 -07:00
Andy Leiserson 885845087f Extract the parts of PassState that apply to the base encoder
And rename a few things.
2025-09-11 10:20:03 -07:00
Andy Leiserson a9638c8e3a Remove pending_query_resets from CommandBufferMutable (#8187)
It is emptied by `reset_queries` at the end of every render pass, so
it's just keeping an allocation alive, not holding any state. It seems
unlikely that there is sufficient performance gain from reusing the
memory allocation to justify the complexity of additional state at
higher layers.
2025-09-09 13:03:12 -04:00
Andy Leiserson 910143d622 Check for more cases of unbalanced debug groups (#8048)
Fixes #3911
2025-08-05 16:52:50 +02:00
SupaMaggie70Incorporated 074c0e7191 Add mesh shading api to wgpu & wgpu-core (#7345) 2025-07-24 20:58:56 -04:00
Lucas Abel b8c462ac31 [core] fix missing applies of DISCARD_HAL_LABELS (#7991) 2025-07-23 12:06:42 -04:00
Andy Leiserson 381932c601 Add CommandEncoderStatus::Consumed 2025-07-22 16:19:18 +02:00
teoxoy b8c5c4add4 rename cmd_buf to cmd_enc where appropriate 2025-07-22 16:19:18 +02:00
teoxoy 63f3df86c8 [wgpu-core] split command encoders from command buffers 2025-07-22 16:19:18 +02:00
Andy Leiserson f5d8a0a06a Additional validation of texture copies (#7935)
* Additional validation of texture copies

 * Copies must not overlap.
 * Copies of multisampled or depth/stencil formats must span
   the entire texture.
 * Move no-op for zero-size copies after parameter validation.

Closes #2951
Fixes #7844

* Fix issue with combined depth+stencil copy on dx12

* PR feedback
2025-07-22 15:17:47 +02:00
Andy Leiserson 9b966bf8a3 Fix for destroyed resource errors 2025-07-10 09:52:20 -07:00
teoxoy 487f79ba44 Add missing device validity checks 2025-07-02 11:11:37 +02:00
Erich Gubler 964c5bbf4c feat(core): impl WebGpuError for API errors 2025-06-30 10:58:56 -04:00
Vecvec 4d36a02691 Unify set bind group. 2025-06-30 15:00:46 +02:00
Andy Leiserson e936c065fc Additional comments on render and compute pass encoding 2025-06-26 15:39:53 -07:00
Andy Leiserson 7722c341e0 Defer destroyed resource errors until cmdbuf submission 2025-06-26 15:39:53 -07:00
Andy Leiserson fc26fbc561 Deferred error reporting for render passes 2025-06-26 15:39:53 -07:00
Andy Leiserson 460f073a67 Deferred error reporting for compute passes 2025-06-26 15:39:53 -07:00
Andy Leiserson 09c08037c9 Add a field in BasePass to store errors 2025-06-26 15:39:53 -07:00
Andy Leiserson 3a5d0f2747 Deferred error reporting for other command encoder operations
* clear commands
* query set functions
* command_encoder_as_hal_mut
* ray_tracing
2025-06-17 16:17:43 -07:00
Andy Leiserson e702d1c116 Deferred error reporting for transfer commands 2025-06-17 16:00:49 -07:00
Andy Leiserson 620c9d1e8b Deferred error reporting for debug commands (#7789) 2025-06-12 11:53:32 -07:00
Andy Leiserson ce89c916f8 Add storage for an error in CommandEncoderStatus (#7785) 2025-06-11 09:56:14 -07:00
Andy Leiserson 24f779696b Tweak MapPassErr to work for both errors and results (#7780) 2025-06-10 10:26:36 -07:00