9635 Commits

Author SHA1 Message Date
Magnus
17a17f716a
Initial precompiled shaders implementation (#7834)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-08-20 16:20:59 -04:00
Jamie Nicol
eb9b2e9c9b
Add changelog entry for external texture support (#8123) 2025-08-20 11:35:47 -04:00
renovate[bot]
6a4eaa9293
chore(deps): update cargo.lock (#8116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-20 11:32:22 -04:00
Erich Gubler
57d89b4a4f
docs(vulkan): clarify safety contract for DeviceShared::set_object_name (#8055)
* docs(vulkan): clarify safety contract for `DeviceShared::set_object_name`
2025-08-20 08:22:35 -07:00
Jamie Nicol
9aaed2c0cc
[naga] Ensure validation rejects invalid sample operations of ImageClass::External images. (#8121)
textureSampleBaseClampToEdge() is valid when called on a
`texture_external` texture, but all other sample operations are
invalid. Previously validation was succeeding for these operations on
an external texture in cases where the same operation on a
`texture_2d<f32>` would be allowed. We must therefore explicitly check
for ImageClass::External and disallow invalid sample operations.
2025-08-20 08:30:54 +01:00
renovate[bot]
875250348c
chore(deps): update crate-ci/typos action to v1.35.5 (#8114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 20:30:42 -04:00
renovate[bot]
7bd005531e
chore(deps): update actions/checkout action to v5 (#8115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 20:30:21 -04:00
renovate[bot]
21497a5322
chore(deps): update cts digest to 94f4ce1 (#8113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 10:18:46 -07:00
Andy Leiserson
576210214d
Fix minimal versions CI failure (#8112) 2025-08-17 16:23:08 -04:00
SupaMaggie70Incorporated
0c0df249cf
Only commit hopefully (#8101) 2025-08-14 09:03:06 -04:00
renovate[bot]
dd93ed5975
chore(deps): update cargo.lock (#8079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 23:07:26 +00:00
Vecvec
54be6a2b5b
Fix empty ifs causing errors on spirv 1.6 (#7883) 2025-08-13 15:27:51 +00:00
Kevin Reid
2d835bf3b4 Call uncaptured error handler without the lock held.
This prevents a possible deadlock if the callback itself calls wgpu
operations.
2025-08-13 16:26:46 +01:00
Kevin Reid
ea8315e28e Change uncaptured error handler pointer type from Box to Arc.
This will be necessary for the next change.
2025-08-13 16:26:46 +01:00
Kevin Reid
2e8a600e35 Add Sync bound to uncaptured error handler.
It makes sense for a function to be `FnMut + Send`, or `Fn + Send + Sync`,
but not `Fn + Send` because that is overly restrictive for the caller and
the callee.
2025-08-13 16:26:46 +01: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
Jim Blandy
01b3204e7f
[hal] Minor doc clarification. (#8087)
Don't use the term "single-threaded", since it's confusing. Just say
what you mean.
2025-08-12 12:54:04 -04:00
Jim Blandy
a96a6cd63b
Update to slab 0.4.11. (#8088) 2025-08-12 18:49:16 +02:00
Erich Gubler
445ecb3fee
Update backport label ref. in release-checklist.md & style fixes (#8081)
* docs(release-checklist): sync backporting label name with current one

* style(release-checklist): run `prettier`
2025-08-11 17:10:26 -04:00
Andy Leiserson
e7dad314ed
Accept configuration from the environment for the trace player (#8083) 2025-08-11 22:04:53 +02:00
Andy Leiserson
0cc8c11afe
Escape control chars in source when printing diagnostics (#8049) 2025-08-11 12:16:46 -07:00
Erich Gubler
f9df2b5442 docs(CHANGELOG): move #7345's entry to Unreleased 2025-08-11 09:35:02 -04:00
Erich Gubler
d17228fda8 docs(CHANGELOG): port 26.0.{3,4} release notes 2025-08-11 09:35:02 -04:00
Erich Gubler
02636cd940 style(CHANGELOG): trim extra whitespace 2025-08-11 09:35:02 -04:00
renovate[bot]
505d721674
chore(deps): update rust crate ctor to 0.5 (#8078)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 11:20:14 +02:00
renovate[bot]
0990ecd574
chore(deps): update crate-ci/typos action to v1.35.3 (#8077)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 11:16:35 +02:00
Marc Pabst
e7cdfc436a
Allow disabling waiting for latency waitable object (#7400) 2025-08-10 10:01:25 +00:00
sagudev
f04b3b020f
Remove lifetime from BufferSlice, BufferView, BufferViewMut (#8046) 2025-08-10 11:15:36 +02:00
Erich Gubler
b9f66e77e5
docs(release-checklist): include This release includes crate, … in the CHANGELOG, too (#8063) 2025-08-10 11:10:10 +02:00
Lisitsa Nikita
1b948fbf42
Fix 'Read-only attachment with load' error message (#8068) 2025-08-09 17:58:32 +02:00
Lisitsa Nikita
b1bf444b7a
Fix error message when render pipeline vertex attribute location is greater or equal to the maximum number of vertex attributes (fixes #8064) (#8065) 2025-08-09 17:48:11 +02:00
Erich Gubler
f6a3af1f1d refactor(deno_webgpu): remove unused allow(dead_code) on GPUError::Internal 2025-08-09 07:50:51 -04:00
Erich Gubler
495df81f14 fix(deno_webgpu): expose GPUUncapturedErrorEvent in bootstrap.js 2025-08-09 07:50:51 -04:00
Erich Gubler
1241bb0384 fix(deno_webgpu): expose GPUInternalError in bootstrap.js 2025-08-09 07:50:51 -04:00
Bot-Kerem
e990388af9
Update README.md (#8069) 2025-08-08 23:58:57 +01:00
Andy Leiserson
605f40d866 Vendor web-sys 2025-08-08 23:58:25 +01:00
Andy Leiserson
7816390566 Make vendor-web-sys xtask accept a SHA
Also, update wasm-bindgen URLs
2025-08-08 23:58:25 +01:00
Erich Gubler
0c30efe857
docs(release-checklist): sync backporting label name with current one (#8062) 2025-08-08 23:50:26 +01:00
Andy Leiserson
24a05fefdf
Update CHANGELOG (#8050) 2025-08-07 18:01:45 -07:00
Jamie Nicol
1bf1671ed8 [test] Add external texture GPU tests
These tests cover the external texture binding resource. They ensure
the WGSL functions `textureDimensions()`, `textureLoad()`, and
`textureSampleBaseClampToEdge()` work as expected for both
`TextureView`s and `ExternalTexture`s bound to external texture
resource bindings.

For external textures, they ensure multiplanar YUV formats work as
expected including handling color space transformation. And that the
provided sample and load transforms correctly handle cropping,
flipping, and rotation.
2025-08-06 17:31:50 +02:00
Jamie Nicol
bd85c9a99a [test] Rename existing external_texture tests to external_image_copy
These existing tests cover `Queue::copy_external_image_to_texture()`
which, despite the similar name, is unrelated to the external texture
binding resource.

The following patch is going to add some tests for the latter, so we
are taking this opportunity to rename the former to help avoid
confusion.
2025-08-06 17:31:50 +02:00
Jamie Nicol
b3a3dc33b6 [dx12] Support external textures on DX12
This implements the DX12 HAL part of external texture support, which is
the final piece of the puzzle for external textures on DirectX 12.

When creating a pipeline layout, HAL is responsible for mapping a
single BindingType::ExternalTexture bind group entry to multiple
descriptor ranges in the root signature it creates: 3 SRVs (one for
each texture plane) and a CBV for the parameters buffer. Additionally
we must expose the additional bindings to the Naga backend via the
`external_texture_binding_map`. Lastly, when creating a bind group we
write the descriptors for each of these bindings to the heap.

And with that, we can finally enable the `EXTERNAL_TEXTURE` feature
for the dx12 backend.
2025-08-06 17:31:50 +02:00
Erich Gubler
b5385225ab
fix(core): validate effective buf. binding size is aligned to 4 (#8041)
The WebGPU spec. `createBindGroup` [states][spec-ref] (emphasis mine):

> Device timeline initialization steps:
>
> …
>
> 2. If any of the following conditions are unsatisfied generate a
>    validation error, invalidate _bindGroup_ and return.
>
>    …
>
>    For each `GPUBindGroupEntry` _bindingDescriptor_ in
>    _descriptor_.`entries`:
>
>    - …
>
>    - If the defined binding member for _layoutBinding_ is:
>
>      - …
>
>      - `buffer`
>
>        - …
>
>        - If _layoutBinding_.`buffer`.`type` is
>
>          - …
>
>          - `"storage"` or `"read-only-storage"`
>
>            - …
>
>            - effective buffer binding size(_bufferBinding_) is a multiple of 4.

[spec-ref]: https://www.w3.org/TR/webgpu/#dom-gpudevice-createbindgroup

We were not implementing this check of effective buffer binding size.
Check that it's a multiple of 4, including
`webgpu:api,validation,createBindGroup:buffer,effective_buffer_binding_size:*`
that this is now implemented as intended.
2025-08-06 16:19:08 +02:00
Jamie Nicol
8cd4bd602f [naga hlsl-out] Handle external texture color space conversion
This adds several fields to `ExternalTextureDescriptor`, specifying
how to handle color space conversion for an external texture. These
fields consist of transfer functions for the source and destination
color spaces, and a matrix for converting between gamuts. This allows
`ImageSample` and `ImageLoad` operations on external textures to
return values in a desired destination color space rather than the
source color space of the underlying planes.

These fields are plumbed through to the `ExternalTextureParams`
uniform buffer from which they are exposed to the shader. Following
conversion from YUV to RGB after sampling/loading from the external
texture planes, the shader uses them to gamma decode to linear RGB in
the source color space, convert from source to destination gamut, then
finally gamma encode to non-linear RGB in the destination color space.
2025-08-06 11:18:42 +01:00
Erich Gubler
88a8147194
test(deno_webgpu): add --release to cargo xtask cts (#8053) 2025-08-05 19:35:20 -04:00
Andy Leiserson
910143d622
Check for more cases of unbalanced debug groups (#8048)
Fixes #3911
2025-08-05 16:52:50 +02:00
atlv
7cb642eba7
fix STATUS_HEAP_CORRUPTION crash in create_sampler (#8043)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2025-08-05 14:43:54 +00:00
Vecvec
a1168613d2
Prevent resources for acceleration structures being created if they are not enabled (#8036)
* Prevent resources for acceleration structures being created if acceleration structures aren't supported.
2025-08-04 09:37:09 -07:00
renovate[bot]
4938f86cfe
Update Cargo.lock (#8045)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 09:29:57 -07:00
renovate[bot]
fe22fe2bf2
Update cts digest to a46bb82 (#8044)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 09:28:36 -07:00