981 Commits

Author SHA1 Message Date
Opstic
f0209e3db8
Add support for transient textures on Vulkan and Metal (#8247)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-10-16 19:50:01 +00:00
Kevin Reid
98c345800a [hal] Replace cargo-clippy feature with lint configuration. 2025-10-15 19:34:40 -04:00
Erich Gubler
54ded60d8e fix(dx12): align tex. <-> buf. copies via intermediate buffer if !UnrestrictedBufferTextureCopyPitchSupported 2025-10-14 09:39:56 -04:00
Jim Blandy
1cbebdcffe
[core] Don't skip binding index checks for derived layouts. (#8325)
When deriving a bind group layout for a pipeline, bother to enforce
`wgpu_types::Limits::max_bindings_per_bind_group`. Move the check:

- from `wgpu_core::device::bgl::EntryMap::from_entries`, which is only used
  for explicit bind group creation

- into `wgpu_core::device::Device::create_bind_group_layout`, which is used
  for all bind group layout creation.
2025-10-10 16:38:35 +00:00
Tom Schuster
2e48faf95d
Map more limits in WebGPU (#8328) 2025-10-10 12:11:16 -04:00
Robin Cramer
d0bb62a157
Added from_custom to texture (#8315) 2025-10-09 17:22:54 +02:00
Erich Gubler
adf4b2f2de fix: reject fragment shader output locations > max_color_attachments limit 2025-10-08 16:34:43 -04:00
Erich Gubler
bbedf6c226
docs(CHANGELOG): polish enumerate_adapters-is-async section (#8318)
* docs(CHANGELOG): polish `enumerate_adapters`-is-`async` section

* docs(CHANGELOG): indirectly acknowledge "yield" joke
2025-10-08 18:19:00 +00:00
Sam
a8f51f8fd1
Split MipmapFilterMode from FilterMode (#8314) 2025-10-08 18:06:33 +02:00
Erich Gubler
8ff1eb995d
typo(CHANGELOG): s/elimnating/eliminating (#8317) 2025-10-07 12:23:06 -07:00
renovate[bot]
854664a90d
chore(deps): update crate-ci/typos action to v1.37.3 (#8306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-10-06 19:32:39 +00:00
Robin Cramer
4652ea4189
Changed enumerate_adapters to be able to work with custom backends (#8230)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-10-06 19:27:23 +00:00
Connor Fitzgerald
d28fb4d776
Update changelog for release v27.0.2 (#8293) 2025-10-06 13:11:35 -04:00
Clar Fon
790235717e
Make include_spirv actually work statically (#8250) 2025-10-04 09:50:52 +02:00
David Stern
b3c6a0b5cc
Gate DX12 mesh shader command signature initialization on device support. (#8297) 2025-10-04 00:41:58 +00:00
Connor Fitzgerald
482a983e10
Release v27 (#8287) 2025-10-01 19:36:18 -04:00
Andreas Reich
333f811e9c
Rework wgpu::PollType to only two enum variants (#8285) 2025-10-01 18:08:07 -04:00
Erich Gubler
90702156af fix(namer): escape, rather than strip, non-ASCII ident. characters
Escape non-ASCII identifier characters with `write!(…, "u{:04x}", …)`,
surrounding with `_` as appropriate. This solves (1) a debugging issue
where stripped characters would otherwise be invisible, and (2) failure
to re-validate that stripped identifiers didn't start with an ASCII
digit.

I've confirmed that this fixes [bug
1978197](https://bugzilla.mozilla.org/show_bug.cgi?id=1978197) on the
Firefox side.
2025-10-01 08:50:37 -04:00
Andreas Reich
00ea850d79
Allow timeouting on poll (#8282) 2025-10-01 07:19:24 +00:00
Erich Gubler
06fc6f7345
feat(wgsl): recognize enable primitive-index; (#8237) 2025-09-30 22:02:10 +00:00
Nils Hasenbanck
8c4aebc0c1
(Naga) Implement OpImageGather and OpImageDrefGather when ingesting SPIR-V (#8280) 2025-09-29 13:15:32 -04:00
Marijn Suijten
ea80c7dbc3
hal/vulkan: Accurately map all formats except fp16 to use the non-linear sRGB color space (#8226) 2025-09-29 11:50:10 -04:00
Nils Hasenbanck
8cb94db802
(Naga) Add support for Storage Image Multisample when ingesting SPIR-V (#8270) 2025-09-29 11:45:39 -04:00
Vecvec
f1c876c875
Create a seperate event for each fence wait. (#8273)
* create an event per fence wait

* Use seperate event for each `wait_for_present_queue_idle` call.

* changelog
2025-09-29 11:38:33 -04:00
Andy Leiserson
1967900565
Encode commands on finish (#8220)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-09-25 14:22:51 -04:00
Nils Hasenbanck
2f7ebf1401
(Naga) Add support for Descriptor Runtime Indexing when ingesting SPIR-V (#8256) 2025-09-25 08:25:04 -04:00
Magnus
05cc6dca82
[hal/dx12] Mesh Shaders (#8110)
* Features and draw commands added

* Tried to implement the pipeline creation (completely untested)

* Fixed clippy issues

* Fixed something I think

* A little bit of work on the mesh shader example (currently doesn't work on dx12)

* Reached a new kind of error state

* Fixed an alignment issue

* DirectX 12 mesh shaders working :party:

* Removed stupid change and updated changelog

* Fixed typo

* Added backends option to example framework

* Removed silly no write fragment shader from tests to see if anything breaks

* Tried to make mesh shader tests run elsewhere too

* Removed printlns and checked that dx12 mesh shader tests run

* Documented very strange issue

* I'm so lost

* Fixed stupid typos

* Fixed all issues

* Removed unnecessary example stuff, updated tests

* Updated typos.toml

* Updated limits

* Apply suggestion from @cwfitzgerald

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Apply suggestion from @cwfitzgerald

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Removed supported backends, made example & tests always pass the filename to shader compilers

* Removed excessive bools in test params

* Added new tests to the list

* I'm a sinner for this one (unused import)

* Replaced random stuff with test params hashing

* Updated typos.toml

* Updated -Fo typo thing

* Actually fixed typo issue this time

* Update CHANGELOG.md

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Update tests/tests/wgpu-gpu/mesh_shader/mod.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update wgpu-hal/src/dx12/mod.rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Addressed comments

* Lmao

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-25 03:24:56 +00:00
Andy Leiserson
1f10d0ce8a
[naga] Don't report shader errors as their own source (#8258) 2025-09-24 22:42:24 -04:00
EriKWDev
3efd640178
naga: Correct spelling in wgsl parsing rg11b10float -> rg11b10ufloat (#8219) 2025-09-21 10:41:17 +00:00
Matthias Reitinger
b55c24cf27
[naga wgsl-in] Allow trailing comma in switch cases (#8165) 2025-09-16 07:58:23 -04:00
Andy Leiserson
f4ea8642a5
docs(CHANGELOG): Update pull request reference (#8208) 2025-09-11 00:52:02 -04:00
Andy Leiserson
d31d944ed5
Clarify the effect of the SUBGROUP features and capabilities (#8203) 2025-09-10 20:53:56 -04:00
Night_Hunter
3902b0c11c
Add support for builtin DComp swapchains (#7550)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
2025-09-11 00:19:42 +00:00
Connor Fitzgerald
fb28da16c1 [wgpu] add convience functions for deferring mapping/callbacks
Co-authored-by: Kevin Reid <kpreid@switchb.org>
2025-09-07 09:42:57 +02:00
Connor Fitzgerald
832609959d
Convert QueueWriteBufferView to be lifetime-less (#8161) 2025-09-07 07:34:06 +00:00
Andy Leiserson
4853133eaa Fix buffer initialization tracking for some buffer-texture copies (#8099)
Fixes #7947
Fixes #8021
Fixes #8097
2025-09-04 14:15:31 -07:00
Andy Leiserson
989d48ccb6 Tweak the bytes_per_row alignment check
Previously, the check was skipped if the copy was a single row, which is
not correct. The check should be made whenever bytes_per_row is
specified. It is permissible not to specify bytes_per_row if the copy is
a single row, but if it is specified, it must be aligned.

Also removes a redundant check of the `offset` alignment.

Since the offset and bytesPerRow alignment checks are not part of
"validating linear texture data", I chose to remove that instance of
them. These checks are now in `validate_texture_buffer_copy`, which
does not correspond 1:1 with the spec, but has a comment explaining how
it does correspond.
2025-09-04 14:15:31 -07:00
Connor Fitzgerald
c488bbe604
[wgpu] Improve buffer mapping errors and allow multiple immutable borrows (#8150)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-09-02 12:21:16 -04:00
Connor Fitzgerald
8d1f4bb5f2
Require token for experimental features (#8163) 2025-08-29 15:43:27 -04:00
Matthias Reitinger
80a742094c
[wgpu-core] Improve errors for forbidden texture copy formats (#8156)
TransferError now has separate variants for texture copy formats that
are only forbidden in combination with specific aspects
(CopyFrom/ToForbiddenTextureFormatAspect), and texture copy formats that
are always forbidden, irrespective of the aspect
(CopyFrom/ToForbiddenTextureFormat).

This produces a less confusing error message by not mentioning the
aspect it is not relevant.
2025-08-29 10:03:35 +00:00
Lucas Abel
cd14b194a4
[egl] get rid of unwrap where possible (#8024)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-08-28 21:59:54 +00:00
Andy Leiserson
4a7b6abb19 Add F16_IN_F32 downlevel flag for pack/unpack/quantize f16 (#8130)
Although the operation of these functions is defined in terms of f16
semantics, the input/output types are not f16, and they are generally
available even when native `f16` support is not. But in at least one
case, they are only available with `f16` support, so add a new downlevel
flag that is cleared when these functions are not available.

Add some infrastructure to simplify testing of missing
capabilities/extensions, and add tests for a few more kinds of f16
usage.

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2025-08-28 13:58:36 -07:00
Connor Fitzgerald
2ff46cd7cd
Remove MULTI_DRAW_INDIRECT feature (#8162) 2025-08-28 12:00:14 -04:00
Connor Fitzgerald
97ba77d668
We're just lowercase bro (#8160) 2025-08-28 11:09:07 -04:00
Kevin Reid
1c8d769b67
[naga] Introduce KeywordSet and CaseInsensitiveKeywordSet. (#8136) 2025-08-27 23:42:02 -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
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