Commit Graph
9662 Commits
Author SHA1 Message Date
Kevin Reid 1c8d769b67 [naga] Introduce KeywordSet and CaseInsensitiveKeywordSet. (#8136) 2025-08-27 23:42:02 -04:00
Connor Fitzgerald ca3f7f8989 [tests] Add test priorities so that heavy tests run first (#8152) 2025-08-27 21:45:50 +00:00
David Duarte 780bdfc909 hal/vulkan: Increment counter for intermediate shaders (#8066) 2025-08-27 16:26:18 -04:00
David Duarte 0372d318ca ci: Update vulkan sdk to 1.4.321.0 (#8157) 2025-08-27 10:16:20 -04:00
Andy Leiserson 9a8dbfb85c Link image_copy depth/stencil dx12 failures to #8133 (#8148) 2025-08-25 13:43:17 -04:00
Connor Fitzgerald 6adb058c50 [ci] Fix minimal version job (#8147) 2025-08-25 12:42:19 -04:00
Connor Fitzgerald 884cea5ad9 Narrow locks in queue::write_buffer (#8146) 2025-08-25 11:54:30 -04:00
renovate[bot] 1301f80688 Update Rust crate cargo_metadata to 0.22 (#8144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 14:10:50 +00:00
renovate[bot] fdde05c7c0 Update cts digest to f164473 (#8143) 2025-08-25 04:22:26 -04:00
renovate[bot] 03d419d094 Update Cargo.lock (#8145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 09:28:37 +02:00
Kevin Reid c1254b4c80 Add more overview documentation to Buffer and usages. 2025-08-24 17:30:48 -04:00
Magnus 24a31c494a Only commit hopefully (#8140) 2025-08-24 17:23:21 -04:00
Andy Leiserson 57368b374f Disable copy_ranges on dx12 due to intermittent failures (#8141) 2025-08-24 17:21:12 -04:00
Andy Leiserson 779249fa92 Remove security issue type; github adds it automatically (#8142) 2025-08-24 17:20:33 -04:00
Erich Gubler dd73743e78 fix(wgsl-in): accept trailing comma in @blend_src(…) attr. (#8137) 2025-08-24 11:37:19 -07:00
Vecvec c4a834e4f9 Make the compacted hal acceleration structure inherit a label from the base BLAS. #8103 2025-08-24 09:11:13 +00:00
Jim Blandy 7394d4351b Remove copy-pasted mention of acceleration structures from mesh docs. (#8135) 2025-08-24 02:13:40 -04:00
Connor Fitzgerald 37c4c88138 Fix RT validation error (#8132) 2025-08-24 07:09:25 +12:00
Jamie Nicol 167ff7b952 [metal] Implement support for external textures
This contains the Metal HAL changes required to support external
textures. When creating a bind group we create resource bindings for
each of the 3 textures and parameters buffer that the external texture
has been lowered to. When creating the pipeline layout we fill the
`BindTarget` accordingly, so that the Naga MSL backend can bind each
of the global variables to which the the external texture has been
lowered to each of these resources.

We must also ensure the size of the buffer bound to the parameters
global matches the size of the MSL type, else metal validation
complains. We do this by adding a padding field to the rust-side
ExternalTextureParams struct, the size of which is used as the size of
the buffer to allocate.

Lastly we enable `Features::EXTERNAL_TEXTURE` on the Metal backend.
2025-08-21 12:35:19 +01:00
Jamie Nicol 2c6f06a82b [naga msl-out] Implement support for external textures
This adds MSL backend support for `ImageClass::External`. (ie WGSL's
`external_texture` texture type). This is implemented very similarily
to the HLSL implementation in #7826.

Each external texture global variable is lowered to 3 `texture2d`s and
a buffer of type NagaExternalTextureParams. As usual in Naga's MSL
backend, these are passed as arguments to the entry point. The
bindings for each of these arguments are provided via the usual
binding map, using a new `BindExternalTextureTarget` variant of
`BindTarget`.

Unlike HLSL, MSL allows textures to be used as fields in structs. We
therefore immediately wrap these variables in a
`NagaExternalTextureWrapper` struct. This wrapper can then
conveniently be passed to either user-defined functions or builtin
implementations that accept an external texture.

The WGSL builtins `textureDimensions()`, `textureLoad()`, and
`textureSampleBaseClampToEdge()` are implemented using wrapper
functions using the regular `write_wrapped_functions()` machinery.
2025-08-21 12:35:19 +01:00
Jamie Nicol 2cada72dfb [naga] Make external texture snapshot test call textureLoad() with both vec2<i32> and vec2<i32> coordinates
The HLSL external texture implementation didn't have to do anything in
particular to handle both coordinate types, as int2 automatically gets
promoted to uint2. But in MSL this is not the case, and it is
therefore important to test that we correctly handle both coordinate
types.
2025-08-21 12:35:19 +01:00
Jamie Nicol bb21da3014 [naga msl-out] Split up write_wrapped_functions()
It was getting unwieldy, and upcoming commits are going to add
additional functions that will be wrapped.
2025-08-21 12:35:19 +01:00
cryvosh 4b5e38ab49 [naga spv-out] Add f16 io polyfill (#7884) 2025-08-21 10:50:32 +02:00
Andy LeisersonandKevin Reid 2996c926d4 [docs] Security policy (#8006)
---------
Co-authored-by: Kevin Reid <kpreid@switchb.org>
2025-08-20 19:20:22 -07:00
Andy Leiserson 8897c9e93f [deno] Enable additional vertex formats (#8095) 2025-08-20 15:35:42 -07:00
Andy Leiserson e7a99be058 [deno] Fix some problems in the handling of device limits (#8085)
* Correct error type when a requested limit is too high
* Clamp requested limits to the WebGPU defaults

Fixes #8084
2025-08-20 14:58:56 -07:00
Connor Fitzgerald fe86710af7 Properly enable getrandom in nanorand (#8098) 2025-08-20 17:16:58 -04:00
MagnusandConnor Fitzgerald 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