Commit Graph
9378 Commits
Author SHA1 Message Date
Andy Leiserson d9c4bf22ea Panic on errors in pass_end_with_unresolved_commands (#7765) 2025-06-09 11:28:43 -07:00
Andy Leiserson 1194833a74 [deno] Make QuerySet.destroy a no-op for now (#7758)
Implementing it is tracked by #6495. In the mean time it is okay for it
to be a no-op. `destroy` just recovers the resources earlier than garbage
collection might, doing nothing is not a leak.
2025-06-09 10:22:42 -07:00
renovate[bot] d09c730c02 chore(deps): update rust crate nanorand to 0.8 (#7772) 2025-06-09 04:10:11 +00:00
renovate[bot] 8e7b87bee8 chore(deps): update cargo.lock (#7774)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 04:02:58 +00:00
renovate[bot] d1a5b6e98f chore(deps): update rust crate which to v8 (#7773)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 23:27:55 -04:00
renovate[bot] e7d3bb440e chore(deps): update crate-ci/typos action to v1.33.1 (#7771)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 23:24:40 -04:00
LitoMore 9c0ccae357 Polish badges (#7769) 2025-06-07 17:51:30 -04:00
tesselode 18581f38fe remove outdated docs for Adapter::request_device (#7768) 2025-06-07 11:48:40 +02:00
Andy Leiserson 6c7f934af6 Update CTS section in README (#7762)
* Update CTS section in README

* gitignore `cts` it even if it is a symlink, but always limit to the repo root.
2025-06-06 14:57:14 -04:00
sagudev 55fd09786a Use composite action for mesa install (#7763)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-06-06 10:23:27 -07:00
Andy Leiserson 233a25c1e5 Update to the latest CTS; run it on all platforms and on all PRs (#7752) 2025-06-05 22:04:45 -04:00
Teodor Tanasoaia dcada3d858 [d3d12] add a shader cache to avoid calling into DXC/FXC (#7729) 2025-06-05 15:20:51 +02:00
Teodor Tanasoaia 23b81da5cc [hlsl-out] polyfill float remainder operator (#7750) 2025-06-05 15:14:03 +02:00
Thierry Bergerandteoxoy 28af245d51 [wgsl-in,ir] Add support for parsing rust-style doc comments (#6364)
* [wgsl-in,ir] add support for parsing rust-style doc comments

* rename relevant items to `doc_comments` (or variations of it)

* address comments

* remove `next_until`

* rename `save_doc_comments` to `ignore_doc_comments`

* expand snapshot test and ignore blankspace when accumulating doc comments

* make tokenizer more straightforward

---------

Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
2025-06-05 15:13:11 +02:00
Connor Fitzgerald 00bc80da61 Update VulkanSDK to 1.3.313 2025-06-04 08:26:11 -07:00
Connor Fitzgerald 24752af93a Suppress VUID-StandaloneSpirv-None-10684 2025-06-04 08:26:11 -07:00
cryvosh bb46a7f046 [naga hlsl-out, glsl-out] Support atomicCompareExchangeWeak (#7658) 2025-06-02 13:36:44 +02:00
James Ordner 921c6ab597 [metal] remove extraneous main thread check (#7692) 2025-06-02 11:19:49 +02:00
Ryan KaplanandRyan Kaplan 1268219ba3 Change API from BufferSlice::get_mapped_range_as_array_buffer() to BufferView::as_uint8array() to fix bug where using the former API prevents you from ever unmapping your buffer (#7738)
Co-authored-by: Ryan Kaplan <ryan@Ryans-M2>
2025-06-01 22:46:55 -04:00
renovate[bot] f139e223e2 chore(deps): update cargo.lock (#7745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-01 21:37:42 -04:00
andristarr 0e1baff277 Navigatable docs for BufferUsages::MAP_WRITE (#7742) 2025-06-01 20:22:56 +09:00
Andy Leiserson 6ead025a95 Remove flaky test_stack_size (#7739) 2025-05-30 22:12:31 -04:00
Andy Leiserson ffd5b9aeea Tweaks to CTS xtask, useful when running a modified CTS. (#7737) 2025-05-30 15:09:32 -07:00
Andy Leiserson a04085c5e4 Update naga benchmarks and add a compaction benchmark (#7715) 2025-05-30 15:02:05 -07:00
Doublonmousse 1da7cd4811 External gles framebuffer (#7671) 2025-05-30 19:16:47 +00:00
renovate[bot]andConnor Fitzgerald 70b06b19a1 chore(deps): update cargo.lock (#7727)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-05-30 14:54:08 -04:00
Hubert Głuchowski a9e04f88af wgpu-hal: Expose vulkan::PhysicalDeviceFeatures (#7682) 2025-05-30 12:32:24 -04:00
Zachary HarroldandConnor Fitzgerald 6151330e3a [wgpu-hal]: MVP no_std support (#7599)
* MVP `no_std` support in `wgpu-hal`

* Update CHANGELOG.md

* Fix visibility

* Fix unused imports

* Response to feedback

Co-Authored-By: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Update other `validation_canary` usages

Co-Authored-By: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-05-30 12:31:44 -04:00
RedMindZ d190106c3f Load FXC dynamically to remove the dependency on d3dcompiler_47.dll (#7588) 2025-05-29 18:41:03 -04:00
Zachary Harrold 97794f12a9 [wgpu-hal]: Reduce std usage in wgpu-hal/gles (#7597) 2025-05-29 18:30:14 -04:00
Raphael Hetzel 0d569d5550 Optional web-specific deps for wasm32 (#7565) 2025-05-29 22:26:01 +00:00
Andy Leiserson f34dfd90e0 [naga] Allow unreachable statements (#7718)
Allow unreachable statements after return/break/continue/discard.

Fixes #7536
2025-05-28 15:46:49 +00:00
Andy Leiserson 38e667efa5 Update the changelog entry for destroy of texture/buffer (#7731) 2025-05-28 11:27:08 -04:00
Andy Leiserson 3cca5f8cfd Make the copy_buffer_to_buffer size parameter optional (#7659)
* Make wgpu-core's copy_buffer_to_buffer `size` parameter optional

* Make the copy size optional in more places

* Fix for webgpu backend

* [deno_webgpu] Support additional copyBufferToBuffer signatures

* Add changelog entry

* Add copyBufferToBuffer tests to CTS test list

(This doesn't actually enable the tests for the new overloads, because
of a different error reporting issue that affects many CTS tests
including these. But if you run the tests for the new overloads
manually, before and after the fix, you can see that the behavior has
changed.)

* Reproducible formula for vendoring modified webgpu-sys

Commit the updated vendor command in all the files for consistency.
2025-05-28 17:21:19 +02:00
renovate[bot] 8d3ade9e7f chore(deps): update rust crate criterion to 0.6 (#7726)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 18:13:59 -04:00
Dmitry Zamkovandvalaphee 9c023e5e29 Implement subgroup quad ops (#7683)
* Rudimentary impl of quad ops, impl quad ops for spirv

* Impl quad swap for hlsl, msl and wgsl, finish spv front

* Cargo clippy & cargo fmt, impl valid for quad ops

* Enable quad feature

* Add missing feature to glsl

* Simplifying code by making `SubgroupQuadSwap` an instance of `SubgroupGather`

* Add `GroupNonUniformQuad` spv capability to Vulkan

* Adding GPU tests for quad operations

* Validate that broadcast operations use const invocation ids

* Added changelog entry

---------

Co-authored-by: valaphee <32491319+valaphee@users.noreply.github.com>
2025-05-26 09:32:01 +02:00
Andy Leiserson 4cd8be548c Add an xtask to run the CTS (#7719) 2025-05-26 09:28:50 +02:00
Andreas Reich 661b1720cb Update changelog for v25.0.2 and v24.0.5 (#7724) 2025-05-25 17:35:50 -04:00
Erich Gubler d000d1ac05 chore: update gpu-descriptor 0.3.1 → 0.3.2 (#7725) 2025-05-25 16:05:17 +02:00
Andy Leiserson 24d0eae36c Remove another type of error that could be raised by destroy (#7720) 2025-05-24 17:02:00 +02:00
Dmitry ZamkovandAndreas Reich 44957709ff Vulkan support for SHADER_EARLY_DEPTH_TEST and fix to conservative depth optimizations (#7676)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-05-24 09:52:39 +00:00
Robert Bamler ff291654b3 [wgpu-hal] Add PrivateCapabilities::shader_int8 on Vulkan
This allows declaring the SPIR-V capability "Int8", which allows us to
generate faster code for `[un]pack4x{I, U}8[Clamp]`.
2025-05-23 16:08:26 +02:00
Robert Bamler e636696e16 [wgpu-hal] separate 2 float16-related vk features
Separates the Vulkan feature sets
`VkPhysicalDeviceShaderFloat16Int8Features` and
`VkPhysicalDevice16BitStorageFeatures`, which previously were used
"together, or not at all".

This commit should not change any behavior yet, but I'd like to run full
CI tests on it for now. If the CI tests pass, I'll use this separation
to enable the `shader_int8` feature separately from the rest of the
features to enable optimizations of `[un]pack4x{I,U}8[Clamp]` on SPIR-V.
2025-05-23 16:08:26 +02:00
Robert Bamler 1be38fa2e2 Add changelog entry for #7664 2025-05-23 16:08:26 +02:00
Robert Bamler 8969965978 [naga] Vectorize [un]pack4x{I, U}8[Clamp] on msl
Implements more direct conversions between 32-bit integers and 4x8-bit
integer vectors using bit casting to/from `packed_[u]char4` when on
MSL 2.1+ (older versions of MSL don't seem to support these bit casts).

- `unpack4x{I, U}8(x)` becomes `[u]int4(as_type<packed_[u]char4>(x))`;
- `pack4x{I, U}8(x)` becomes `as_type<uint>(packed_[u]char4(x))`; and
- `pack4x{I, U}8Clamp(x)` becomes
  `as_type<uint>(packed_uchar4(metal::clamp(x, 0, 255)))`.

These bit casts match the WGSL spec for these functions because Metal
runs on little-endian machines.
2025-05-23 16:08:26 +02:00
Robert Bamler b32eb4a120 [naga] Vectorize [un]pack4x{I, U}8[Clamp] on spv
Emits vectorized SPIR-V code for the WGSL functions `unpack4xI8`,
`unpack4xU8`, `pack4xI8`, `pack4xU8`, `pack4xI8Clamp`, and
`pack4xU8Clamp` if `Capability::Int8` is available.

Exploits the following facts about SPIR-V ops:
- `SClamp`, `UClamp`, and `OpUConvert` accept vector arguments, in which
  case results are computed per component; and
- `OpBitcast` can cast between vectors and scalars, with a well-defined
  bit order that matches that required by the WGSL spec, see below.

WGSL spec for `pack4xI8` [1]:

> Component e[i] of the input is mapped to bits 8 x i through 8 x i + 7
> of the result.

SPIR-V spec for `OpBitcast` [2]:

> Within this mapping, any single component of `S` [remark: the type
> with fewer but wider components] (mapping to multiple components of
> `L` [remark: the type with more but narrower components]) maps its
> lower-ordered bits to the lower-numbered components of `L`.

[1] https://www.w3.org/TR/WGSL/#pack4xI8-builtin
[2] https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpBitcast
2025-05-23 16:08:26 +02:00
Andy Leiserson 0997b99429 [naga] Make additional test code reachable from entrypoints 2025-05-22 13:01:15 -07:00
Andy Leiserson 25636e274b [naga] Ensure globals in wgsl snapshot tests are reachable from an entry point
Convert tabs to spaces in access.wgsl
2025-05-22 13:01:15 -07:00
Andy Leiserson fd6f16f598 Revive the CTS job (#7675)
Includes the following minor functional fixes to deno_webgpu:

* Don't throw an error immediately when `create_buffer` is called with invalid usage flags.
* Implement `on_submitted_work_done`.
* Correct validation of GPUExtent3D element count.
* Run without tracing (instead of panic) if the DENO_WEBGPU_TRACE env var is not set.

Fixes #6838
2025-05-21 09:52:03 -07:00
Robert Bamler d7e6a0e1fa Potentially optimize dot4{I,U}8Packed on Metal (#7653)
* Potentially optimize `dot4{I,U}8Packed` on Metal

This might allow the Metal compiler to emit faster code (but that's not
confirmed). See
<https://github.com/gpuweb/gpuweb/issues/2677#issuecomment-1713292226>
for the optimization. The limitation to Metal 2.1+ is discussed here:
<https://github.com/gfx-rs/wgpu/pull/7574#issuecomment-2835464472>.

* [naga] Factor out new part of `put_block` on msl

CI on test failed because the latest changes to `put_block` made its
stack too big. Factoring out the new code into a separate method fixes
this issue.
2025-05-21 18:47:59 +02:00