934 Commits

Author SHA1 Message Date
cryvosh
4b5e38ab49
[naga spv-out] Add f16 io polyfill (#7884) 2025-08-21 10:50:32 +02: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
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
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
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
Marc Pabst
e7cdfc436a
Allow disabling waiting for latency waitable object (#7400) 2025-08-10 10:01:25 +00:00
Andy Leiserson
24a05fefdf
Update CHANGELOG (#8050) 2025-08-07 18:01:45 -07: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
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
SupaMaggie70Incorporated
074c0e7191
Add mesh shading api to wgpu & wgpu-core (#7345) 2025-07-24 20:58:56 -04:00
Connor Fitzgerald
4bd0f751f8
Backport changelog from v26.0.2 (#7999) 2025-07-24 17:52:11 -04:00
Andy Leiserson
942e59eabc
[naga] Enforce a maximum size for any type (#7950)
* [naga] Enforce a maximum size for any type

Fixes #4339
Fixes #7383

* Doc fix and changelog entry
2025-07-21 13:52:50 +02:00
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