Commit Graph
822 Commits
Author SHA1 Message Date
Andy Leiserson 500e2baedf Enable CTS suite api,validation,encoding,cmds,compute_pass (#8698) 2025-12-09 18:54:51 -05:00
Andy Leiserson 422d539731 Add missing maxColorAttachmentBytesPerSample validation for render passes (#8697) 2025-12-09 13:32:57 -08:00
Andy Leiserson 1ddb5f25c2 Fix early out placement for CopyB2T (#8690) 2025-12-08 21:17:07 -05:00
Teodor Tanasoaia d41e43bc60 [wgpu-core] validate occlusion and pipeline statistics queries end (#8684) 2025-12-08 18:42:26 +01:00
Connor Fitzgerald e3149bac9e LoadOp::DontCare (#8549) 2025-12-08 03:41:38 +00:00
Connor Fitzgerald a356cb2026 Update Repo MSRV to 1.91 (#8678) 2025-12-07 21:52:35 -05:00
Connor Fitzgerald 5895de82b5 Rename push constants to immediates (#8586) 2025-12-01 15:20:02 +01:00
Connor Fitzgerald dc01e6e213 Normalize logging levels (#8579) 2025-11-27 10:55:02 +01:00
Andy Leiserson 7985f571be Adjust the placement of the zero size check for some texture copies (#8567) 2025-11-26 18:12:47 +01:00
Andy Leiserson 6043b059c4 Tweak error behavior for unbalanced passes, and update CTS (#8543) 2025-11-18 11:18:17 -05:00
Andy Leiserson 71820eef20 Fix performance regression in bind group processing (#8519) 2025-11-14 00:10:42 -05:00
Connor Fitzgerald f14458b067 Improve late buffer binding size error (#8484) 2025-11-07 03:21:25 +00:00
Erich Gubler e2e4651ecb fix(core): validate that buffer is unmapped in write_buffer calls 2025-11-05 16:12:58 -05: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 5ac2ed19cb Fix serde feature gating 2025-10-30 13:52:58 +01:00
Andy Leiserson c501ef68df Remove stale attributes 2025-10-30 13:52:58 +01:00
Andy Leiserson 9d0fd2153b Condition macro_rules_attribute dev-dependency on serde feature 2025-10-30 13:52:58 +01:00
Andy Leiserson 07ce023cf1 Replay traces with pointers as IDs 2025-10-30 13:52:58 +01:00
Andy Leiserson 67da4cbc03 Store pointers instead of IDs when tracing (2/2)
This updates non-pass command encoder operations and device operations.
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
Mikołaj Radkowski e7fcb94888 Make multi-planar textures renderable (#8307) 2025-10-29 13:33:48 -04:00
Erich Gubler 54beef8aca typo: TransferError:InvalidMipLevel: s/does no/does not/ (#8437) 2025-10-28 21:11:17 +01:00
Andy Leiserson 3ca6a1c0df Defer some bind group processing until draw/dispatch
This allows us to save some work when a bind group is replaced,
although WebGPU still requires us to fail a submission if any
resource in any bind group that was ever referenced during
encoding is destroyed.

Fixes #8399
2025-10-23 14:59:25 +02:00
Andy Leiserson e8dfc72d04 Small refactors related to bind group tracking for compute passes
* Don't remove resources from the usage scope, it is not necessary, and
  not useful, since we don't verify the scope is empty afterwards.
* Avoid some unnecessary `unsafe`.
2025-10-23 14:59:25 +02:00
Andy Leiserson 7f644452f0 Check for attachment overlap using textures, not views (#8402) 2025-10-22 17:37:38 +02:00
Andy Leiserson d575c0234b Disallow mixing the raw encoding API with the wgpu API (#8373) 2025-10-22 11:34:40 -04:00
OpsticandConnor Fitzgerald f0209e3db8 Add support for transient textures on Vulkan and Metal (#8247)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-10-16 19:50:01 +00: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 4853133eaa Fix buffer initialization tracking for some buffer-texture copies (#8099)
Fixes #7947
Fixes #8021
Fixes #8097
2025-09-04 14:15:31 -07:00
Andy Leiserson 989d48ccb6 Tweak the bytes_per_row alignment check
Previously, the check was skipped if the copy was a single row, which is
not correct. The check should be made whenever bytes_per_row is
specified. It is permissible not to specify bytes_per_row if the copy is
a single row, but if it is specified, it must be aligned.

Also removes a redundant check of the `offset` alignment.

Since the offset and bytesPerRow alignment checks are not part of
"validating linear texture data", I chose to remove that instance of
them. These checks are now in `validate_texture_buffer_copy`, which
does not correspond 1:1 with the spec, but has a comment explaining how
it does correspond.
2025-09-04 14:15:31 -07:00
Matthias Reitinger 80a742094c [wgpu-core] Improve errors for forbidden texture copy formats (#8156)
TransferError now has separate variants for texture copy formats that
are only forbidden in combination with specific aspects
(CopyFrom/ToForbiddenTextureFormatAspect), and texture copy formats that
are always forbidden, irrespective of the aspect
(CopyFrom/ToForbiddenTextureFormat).

This produces a less confusing error message by not mentioning the
aspect it is not relevant.
2025-08-29 10:03:35 +00:00
Connor Fitzgerald 2ff46cd7cd Remove MULTI_DRAW_INDIRECT feature (#8162) 2025-08-28 12:00:14 -04:00
Jamie Nicol 486c151772 [dx12,vulkan] Add support for P010 texture format (#8086)
P010 is a 4:2:0 chroma subsampled planar format, similar to NV12. Each
component uses 16 bits of storage, of which only the high 10 bits are
used. On DX12 this maps to DXGI_FORMAT_P010, and on Vulkan this maps to
G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16.

The existing "nv12" gpu test module has been renamed to
"planar_texture", and a new test P010_TEXTURE_CREATION_SAMPLING has
been added similar to the existing NV12_TEXTURE_CREATION_SAMPLING. The
remaining tests in this module have been converted to validation tests,
and now test both NV12 and P010 formats.
2025-08-13 15:35:20 +02:00
Lisitsa Nikita 1b948fbf42 Fix 'Read-only attachment with load' error message (#8068) 2025-08-09 17:58:32 +02:00
Andy Leiserson 910143d622 Check for more cases of unbalanced debug groups (#8048)
Fixes #3911
2025-08-05 16:52:50 +02:00
Andy Leiserson f25a79595a Add a missing condition to viewport validation (#8040) 2025-08-01 01:10:15 -04:00
Andy Leiserson 36ae215e9c Fix image copy regressions (#8022)
* Restore allowance of unaligned buffer-texture copies

This fixes a regression introduced by #7948. However, it makes it
possible to reach a panic in initialize_buffer_memory if the copy
requires initializing a region of memory that is not 4B aligned.

* Fix CopyT2T of multi-layer depth/stencil textures

* Adjust test list
2025-07-30 14:35:12 +02:00
Andy Leiserson 5089063048 Allow copying one layer of depth/stencil textures (#8020)
This fixes a regression introduced by #7935.
2025-07-29 10:18:26 -07:00