1401 Commits
Author SHA1 Message Date
Marijn Suijten d65295a3ce [d3d12 wgl] Upgrade to windows 0.62 crates (#6876)
* [d3d12 wgl] Upgrade to `windows 0.59` crates

https://github.com/microsoft/windows-rs/releases/tag/0.61.0

The latest `windows 0.59` and `windows-core 0.59` crates were
just released (strangely tagged `0.61`), including some minor code
improvements for us.  The MSRV has been bumped to `1.74`, but `wgpu` is
already on `1.76` anyway.

* [d3d12 wgl] Upgrade to `windows 0.61` crates

https://github.com/microsoft/windows-rs/releases/tag/63

* [d3d12 wgl] Upgrade to windows 0.62 crates

https://github.com/microsoft/windows-rs/releases/tag/69
2025-11-18 12:48:01 -05:00
ad0f3111b7 Add multiview limits and tests (#8206)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Magnus <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-11-01 12:08:15 +00:00
bf9f7524ec Add mesh shading info to naga IR (#8104)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: SupaMaggie70Incorporated <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-10-29 14:49:51 -04:00
Mikołaj Radkowski e7fcb94888 Make multi-planar textures renderable (#8307) 2025-10-29 13:33:48 -04:00
atlv ddcd89fd69 Implement shader barycentrics (#8320) 2025-10-29 13:15:21 -04:00
Connor Fitzgerald ef1d31955a Factor out swapchain to abstracted interface (#8356) 2025-10-26 22:02:40 -04:00
charlotte 🌸 0810110bd7 Add pci bus and device uuid to AdapterInfo (#8290) 2025-10-24 11:53:44 -04:00
Connor Fitzgerald b3d94317d4 [hal/vulkan] Wait for fence signalled in vkAcquireNextImage (#8420) 2025-10-22 23:16:09 -04:00
Jerzy Wilczek a70b8336c0 fix: Move DropGuards to the end of their parent structs. (#8353) 2025-10-16 15:58:18 -04:00
OpsticandConnor Fitzgerald 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
Inner Daemons 70e2302ace Made conv public (#8364) 2025-10-16 04:07:12 +00:00
Kevin Reid 98c345800a [hal] Replace cargo-clippy feature with lint configuration. 2025-10-15 19:34:40 -04:00
Kevin Reid a6f70c7f35 [hal] Remove unused rustc-hash dependency. 2025-10-15 19:34:40 -04:00
Kevin Reid 00b4258b32 [hal] Remove spurious gpu-allocator feature flag.
There was an implicit `gpu-allocator` feature because there was no
`dep:` on the optional `gpu-allocator` dependency, but enabling the
`gpu-allocator` feature does nothing (there are no occurrences of
`#[feature = "gpu-allocator"]`) so it has no reason to exist.
* `
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
Erich Gubler ce69059fdf refactor(dx12): extract copy_aligned in copy_texture_to_buffer 2025-10-14 09:39:56 -04:00
Erich Gubler 4db543cf9b refactor(hal): impl. From conversions b/w wgh::CopyExtent and wgt::Extent3d 2025-10-14 09:39:56 -04:00
Erich Gubler fd7530a011 refactor(dx12): lower list extraction for copies between textures and buffers 2025-10-14 09:39:56 -04:00
Erich Gubler 517018e9ae refactor(dx12): detect UnrestrictedBufferTextureCopyPitchSupported 2025-10-14 09:39:56 -04:00
Jim Blandy 3a78566105 [wgpu-hal] Fix mismatched_lifetime_syntaxes lint in gles. (#8324)
Add a placeholder lifetime to `AdapterContext::get_without_egl_lock`
to address Clippy's concerns about easy-to-misread function
signatures.
2025-10-13 13:21:54 -04:00
Sam a8f51f8fd1 Split MipmapFilterMode from FilterMode (#8314) 2025-10-08 18:06:33 +02:00
renovate[bot]andAndreas Reich 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
Connor Fitzgerald e73d0558f0 Fix docs.rs build (#8292) 2025-10-06 13:11:48 -04: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
Jim Blandy 43eccd28f8 [naga] Remove naga::path_like. Use String instead. (#8284)
Delete the `naga::path_like` module, and simply using `String` and
`str` instead.

Nothing in Naga uses `Path` or `PathBuf` methods; indeed, Naga only
converts these values back and forth from string-like types with
`to_string_lossy` and `into`, such that using string-like, rather than
path-like, types actually simplifies the code.

This also avoids dead code warnings starting in Rust 1.89 that would
otherwise require distracting `#[cfg_attr]` conditionals.
2025-10-01 18:08:18 +02:00
Andreas Reich 00ea850d79 Allow timeouting on poll (#8282) 2025-10-01 07:19:24 +00: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
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
Teodor Tanasoaia ce96254f4f [msl] fix vertex pulling with a stride of 0 (#8265) 2025-09-26 13:37:37 -04:00
Teodor Tanasoaia 3375284f16 [D3D12] fix setting vertex buffer array stride if 0 (#8260) 2025-09-26 11:45:37 +00:00
Xiaopeng Li 990aef977e Expose external memory of vulkan texture (#8257) 2025-09-25 08:27:54 -04:00
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
Jay McCarthyandConnor Fitzgerald 6ef8e1f103 Expose raw handles (#8174)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-09-24 21:16:47 +00:00
Jamie Nicol ba0b6b9b0e [vulkan, naga spv-out] Remap resource bindings
In order to support external textures, we must be able to map a single
external texture resource binding to multiple Vulkan descriptors. This
means we must be able to override the `Binding` and `DescriptorSet`
values for global variables when generating SPIR-V, rather than simply
passing through the group and binding values from Naga IR.

This patch extends the existing SPIR-V Naga backend's `BindingMap` to
contain a descriptor set and binding value in addition to the existing
array size. When creating BindGroupLayouts/BindGroups we use a
sequentially incrementing value for each entry's binding value,
continuing to just use the bind group index as the descriptor set
value.

The Naga backend looks up each resource in the map when emitting its
`Binding` and `DescriptorSet` decorations. If the entry cannot be
found in the map, it will either error or emit fake bindings based on
its configuration.
2025-09-24 17:55:35 +02:00
Jamie Nicol 725549363b [vulkan] Use corresponding bind group layout entries when creating bind groups, rather than list of vk::DescriptorType
This is a refactoring of Vulkan BindGroupLayout and BindGroup creation
in preparation for implementing external texture support.

Currently when creating a BindGroupLayout the Vulkan backend creates a
list of the vk::DescriptorType for each entry, as well as the count, for
binding arrays. Then when creating the BindGroup, it iterates through
this list and does whatever it needs to do for each entry based on these
values.

In order to support external textures, we will have to create multiple
descriptors for each BindingType::ExternalTexture. This means we cannot
map each binding type to a single Vulkan descriptor type. Instead, store
the list of BindGroupLayoutEntries on the BindGroupLayout and use those
when creating the BindGroup, using the same "layout_and_entry_iter"
idiom used by other backends. In subsequent patches this will allow us
to create multiple descriptors for a single resource binding.
2025-09-24 17:55:35 +02:00
Andy Leiserson aee8cd1650 Lazy-load the dcomp library (#8216) 2025-09-15 11:48:28 -07:00
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
Lucas Abel e58223bedf [metal] allow access to command buffer (#8166) 2025-08-29 12:32:34 -04:00
Lucas AbelandAndreas Reich 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 0aacfeadff fix(hal): adjust the conditions when F16_IN_F32 is available 2025-08-28 13:58:36 -07:00
Andy LeisersonandErich Gubler 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
David Duarte 780bdfc909 hal/vulkan: Increment counter for intermediate shaders (#8066) 2025-08-27 16:26:18 -04:00
Magnus 24a31c494a Only commit hopefully (#8140) 2025-08-24 17:23:21 -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
cryvosh 4b5e38ab49 [naga spv-out] Add f16 io polyfill (#7884) 2025-08-21 10:50:32 +02: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