914 Commits

Author SHA1 Message Date
Connor Fitzgerald
085eaa60e8
Forward port v26.0.1 changelog (#7921) 2025-07-10 18:42:49 -04:00
Vecvec
4844fa6b5e
Merge acceleration structure feature and ray query feature. (#7913)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-07-10 19:53:32 +00:00
Erich Gubler
166c2ea2aa
fix(core): check query set index before other validation (#7908) 2025-07-10 19:04:37 +00:00
Kevin Reid
da6ccd5516 Fix undeclared base in profiling scopes.
This would cause compilation to fail if profiling was enabled.
2025-07-10 14:42:08 -04:00
Connor Fitzgerald
8ee66bde9f Update changelog for v26 2025-07-09 20:38:11 -04:00
Connor Fitzgerald
a851eba5f6
Add TextureView::texture (#7907) 2025-07-09 19:53:55 -04:00
Connor Fitzgerald
4f156357b8 Switch as_hal to return a guard 2025-07-09 18:08:11 -04:00
Drew Crawford
92cda27b41
Implement on_submitted_work_done (#7864) 2025-07-01 13:21:27 -04:00
Erich Gubler
c7e6170fd0 refactor(deno): use WebGpuError for error classification 2025-06-30 10:58:56 -04:00
Erich Gubler
cc0f4ac4bf refactor(wgpu)!: use WebGpuError for error classification 2025-06-30 10:58:56 -04:00
Erich Gubler
964c5bbf4c feat(core): impl WebGpuError for API errors 2025-06-30 10:58:56 -04:00
Erich Gubler
c8752e5118 feat(types): add error::{ErrorType, WebGpuError} APIs 2025-06-30 10:58:56 -04:00
Andy Leiserson
41badaedfb Update tests and changelog for deferred error reporting 2025-06-26 15:39:53 -07:00
Vecvec
0d61648eeb
Allow enabling additional vulkan extensions in Adapter::open and Instance::init (#7829)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-26 20:39:41 +00:00
Simon Hausmann
208fe4c23d
Expose the DxgiAdapter in the Hal adapter (#7852) 2025-06-26 16:34:59 -04:00
Andreas Reich
12808193fe
Fix warnings for unrecognized Vulkan present mode (#7850) 2025-06-26 09:33:20 -04:00
Mendy Berger
4c08c37a46
Expose raw_factory (#7827)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-25 19:43:23 +00:00
Erich Gubler
df272d3cfc
chore(CHANGELOG): merge Unreleased/New features/Naga sections (#7802) 2025-06-25 15:02:56 -04:00
Vecvec
dc0d457a9a
Add limits for acceleration structures (#7845) 2025-06-25 14:49:55 -04:00
Erich Gubler
9d14871f01
Fix OpenBSD compilation of wgpu_hal::vulkan::drm (#7810) 2025-06-25 18:02:35 +00:00
atlv
0c05dbf5c9
fix(webgpu): set_unclipped_depth (#7841) 2025-06-24 15:12:47 +02:00
Vecvec
03775c54fe
Prevent naga crashing on an aliased ray query. (#7759) 2025-06-16 08:45:39 +00:00
Dmitry Zamkov
bbb7cc79ef
Implement clip-distances extension for GL and Vulkan backends (#7730)
* Basic implementation of `clip_distances` for Vulkan and GL backends

* Added GPU test for `clip-distances`

* Update feature array size

* Add changelog entry

* Validate `clip_distances` array size

* Check for `clip_distances` enable directive

* Consolidate code for generating `enable` directives in WGSL backend and add `clip_distances`.
2025-06-16 10:33:31 +02:00
Erich Gubler
f96ac55aa4
fix(naga): don't panic on f16s in pipeline constants (#7801) 2025-06-13 10:41:19 -07:00
Andy Leiserson
82fa8e2a94 [naga] Remove non-essential override references via compaction
Adds a mode to compaction that removes unused functions, global
variables, and named types and overrides. This mode is used
everywhere except the compaction at the end of lowering, where
it is important to preserve unused items for type checking and
other validation of the module.

Pruning all but the active entry point and then compacting makes
`process_overrides` tolerant of missing values for overrides that are
not used by the active entry point.

Fixes #5885
2025-06-12 14:22:18 +09:00
Vecvec
aa427de4ea
Remove unsafe acceleration structure build (#7513) 2025-06-12 00:43:03 -04:00
atlv
645354a528
Make naga span methods take path as generic AsRef Path (#7643)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-12 01:55:25 +00:00
Vecvec
73eb83ded1
[wgpu] Blas compaction (#7285)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-11 21:40:10 -04:00
Vecvec
efbac5dfba
Add extra acceleration structure vertex formats. (#7580) 2025-06-11 18:17:14 -04:00
Erich Gubler
db3c35db90 fix(naga): properly impl. auto. type conv. for select 2025-06-11 21:55:02 +09:00
Nico Burns
630905134b
Make strum a dev-only dependency (#7776) 2025-06-11 04:32:11 -04:00
tesselode
18581f38fe
remove outdated docs for Adapter::request_device (#7768) 2025-06-07 11:48:40 +02:00
Thierry Berger
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
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 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
Zachary Harrold
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
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
Dmitry Zamkov
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
Andreas Reich
661b1720cb
Update changelog for v25.0.2 and v24.0.5 (#7724) 2025-05-25 17:35:50 -04:00
Dmitry Zamkov
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
1be38fa2e2 Add changelog entry for #7664 2025-05-23 16:08:26 +02: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
Lucien Greathouse
45b3d66301
Fix error message for sampler arrays (#7704) 2025-05-19 19:25:36 -07:00
Andy Leiserson
0dc6bfdd67
Don't raise AlreadyDestroyed error on repeated destroy() calls (#7686)
* Don't raise `AlreadyDestroyed` error on repeated `destroy()` calls

* Add changelog entry
2025-05-13 09:10:48 +02:00
Zachary Harrold
f04391d916
[naga]: Add no_std polyfill for round_ties_even for f32 and f64 (#7585)
* Rely on `libm` for a `no_std` alternative to `round_ties_even`

Update comments around `no_std` CI task

* Update Cargo.toml

* Feedback

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

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-05-08 09:59:19 -04:00
Mehmet Oguz Derin
2a62299a84
Support Sliced 3D for ASTC (#7577)
Enables "texture-compression-astc-sliced-3d" for backends that support ASTC (such as excluding D3D12).
2025-05-04 12:48:16 +02:00
Robert Bamler
0d06284d96
Allow wgpu-core to use new naga optimizations for dot4{I, U}8Packed (#7595)
* [wgpu-hal] Use highest available SPIR-V version

* [wgpu-hal] Expose capabilities `DotProductInput*`

* Introduce `{PhysicalDeviceFeatures, PrivateCapabilities}::shader_integer_dot_product`
2025-04-30 11:07:20 +00:00
Andy Leiserson
850c3d4310
[naga] Write only the current entrypoint (#7626)
Changes the MSL and HLSL backends to support writing only a single entry
point, and uses them that way in wgpu-hal.

This is working towards a fix for #5885.

* Increase the limit in test_stack_size
2025-04-30 09:59:41 +02:00