Commit Graph

268 Commits

Author SHA1 Message Date
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
Andy Leiserson
620c9d1e8b Deferred error reporting for debug commands (#7789) 2025-06-12 11:53:32 -07:00
Vecvec
aa427de4ea Remove unsafe acceleration structure build (#7513) 2025-06-12 00:43:03 -04: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
renovate[bot]
5a7af54619 chore(deps): update rust crate cargo_metadata to 0.20 (#7744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-06-11 11:24:33 -04:00
Andy Leiserson
77d2b0017a Split EncoderStateError from CommandEncoderError (#7779) 2025-06-10 09:46:30 -07: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
Raphael Hetzel
0d569d5550 Optional web-specific deps for wasm32 (#7565) 2025-05-29 22:26:01 +00: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
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
teoxoy
d14849df48 [vk] add support for rendering to slices of 3D textures 2025-04-25 12:39:45 +02:00
teoxoy
d714e3d95a [d3d12,metal,gl] add support for rendering to slices of 3D textures 2025-04-25 12:39:45 +02:00
teoxoy
5ecc48d494 add RenderPassColorAttachment::depth_slice 2025-04-25 12:39:45 +02:00
teoxoy
6058dd4296 [wgpu-core] allow 2D-Array texture views with a single layer to be used as render attachments 2025-04-25 12:39:45 +02:00
Teodor Tanasoaia
195217b269 allow read-write and read-only storage textures without TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES (#7623) 2025-04-24 11:45:24 -04:00
Connor Fitzgerald
a9e93f9acb Update missed dependencies 2025-04-22 12:04:36 -04:00
teoxoy
3b72d59a3c make memory pressure detection optional and configurable 2025-04-22 09:21:27 +02:00
teoxoy
0a416189b6 [test] add OOM tests 2025-04-22 09:21:27 +02:00
Ebbe Steenhoudt
7cab1747ee Loosen Viewport validation requirements to match the new specs (#7564) 2025-04-18 15:17:53 +02:00
teoxoy
45d78e2fb4 remove DownlevelFlags::VERTEX_AND_INSTANCE_INDEX_RESPECTS_RESPECTIVE_FIRST_VALUE_IN_INDIRECT_DRAW 2025-04-15 17:56:17 +02:00
Bruce Mitchener
fec411cf2d Remove MaintainBase (#7508) 2025-04-10 15:09:29 -04:00
Bruce Mitchener
3081c4f094 Fix typos (#7510) 2025-04-10 15:09:03 -04:00
Vecvec
8010203281 Rework acceleration structure build tracking. 2025-04-09 22:27:04 -04:00
Zachary Harrold
4761e27da5 [naga] Fix improper feature gates (#7484) 2025-04-09 12:10:40 -04:00
Sylvain Benner
14690470bb [metal] Metal compute shader passthrough (#7326)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-04-09 14:25:41 +00:00
Connor Fitzgerald
c344bec508 Comments 2025-04-03 10:35:20 -04:00
Connor Fitzgerald
6a986f4bc4 Timestamp normalization 2025-04-03 10:35:20 -04:00
Kevin Reid
02700ab162 Move test and benchmark targets to standard Cargo autodiscovery layout. (#7436)
This will make it easier for contributors to understand the file layout,
at the cost of said layout containing several more nested directories.
I will personally appreciate not having to remember to look for
`root.rs` instead of `main.rs`.

I also renamed the test targets so that they do not *all* share the
superfluous suffix “-test” (test targets live in a different namespace
than other target types and packages, so the name can presume that it
is always known that they are tests).

The Naga snapshot data sets `naga/tests/{in,out}` have been left in
their original positions.
2025-03-31 21:17:05 -04:00
teoxoy
a2878db5f2 add indirect_buffer_offsets test 2025-03-26 18:26:31 +00:00
teoxoy
53c2d15e0b implement indirect draw validation 2025-03-26 18:26:31 +00:00
Erich Gubler
1e172b2e14 test: repair multi-instance tests (#7388) 2025-03-21 13:25:31 -04:00
Connor Fitzgerald
db4cb26858 Allow overriding instance flags in tests (#7374) 2025-03-20 11:35:54 -04:00
Christopher Fleetwood
c6286791fe feat: implement F16 support in shaders (#5701)
Co-authored-by: FL33TW00D <fleetwoodpersonal@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: ErichDonGubler <erichdongubler@gmail.com>
2025-03-19 16:26:50 +00:00
Andy Leiserson
8474132bd2 [tests] Test case for multiple bindings with different sizes (#7360)
* [tests] Test case for multiple bindings with different sizes (#7359)

* Fix clippy
2025-03-17 18:16:21 -04:00
Kevin Reid
fcac8a9b28 Add Device::noop().
This is a useful shortcut for tests and example code, allowing it to
create a noop device without needing to deal with nonexistent
fallibility and asynchrony.
2025-03-14 20:59:28 -04:00
Kevin Reid
fbe005f11a Make request_adapter() report which backends were tried.
This will help users determine whether the problem is:

* a backend is not statically enabled
* a backend is not dynamically enabled
* no drivers or physical adapters are present for that backend
  (further distinction would be useful here)
* no adapters met the required criteria

There are deficiencies in the reporting of WebGPU vs. WebGL support.
Those would best be fixed by also fixing the mutual exclusion of those
backends.
2025-03-14 11:45:49 +01:00
David Zhong
3eb1bd53bb Use TextureViewDescriptor::usage when Creating Texture View (#7162)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2025-03-11 13:01:23 -04:00
Kevin Reid
326ad03ce1 Move trace_dir/trace_path to a custom enum inside DeviceDescriptor.
This allows `wgpu` to not unconditionally depend on `std::path::Path`.
It’s also, in my opinion, more user-friendly, because the feature which
most users will not use (and is not currently functional) is now a
defaultable struct field instead of a required parameter.

The disadvantage is that `wgpu-types` now has to know about tracing.
2025-03-10 22:17:06 -04:00
Andreas Reich
fedc80eb80 [wgsl-in, wgsl-out, glsl-in] WebGPU compliant dual source blending feature (#7146)
Makes the dual source implementation in wgpu WebGPU spec compliant.
Furthermore, makes the dual source blending extension available when targeting WebGPU.
2025-03-08 21:07:37 +01:00
Kent Slaney
2fac7fa954 [naga] Correct override resolution in array lengths.
When the user provides values for a module's overrides, rather than
replacing override-sized array types with ordinary array types (which
could require adjusting type handles throughout the module), instead
edit all overrides to have initializers that are fully-evaluated
constant expressions. Then, change all backends to handle
override-sized arrays by retrieving their overrides' values.

For arrays whose sizes are override expressions, not simple references
to a specific override's value, let front ends built array types that
refer to anonymous overrides whose initializers are the necessary
expression.

This means that all arrays whose sizes are override expressions are
references to some `Override`. Remove `naga::PendingArraySize`, and
let `ArraySize::Pending` hold a `Handle<Override>` in all cases.

Expand `tests/gpu-tests/shader/array_size_overrides.rs` to include the
test case that motivated this approach.
2025-03-06 14:21:40 -08:00
Vecvec
5b3266db23 Support getting hit vertex positions (#7183) 2025-03-04 20:06:44 +01:00
Connor Fitzgerald
99437e7343 Turn dependency tests from xtask subcommand into #[test]s (#7220) 2025-02-27 05:22:08 +00:00
Connor Fitzgerald
8fb09a5ad6 Move REPO_MSRV to 1.85 (#7218) 2025-02-24 23:39:34 -05:00
Connor Fitzgerald
8a4e50f1a0 Rename tests/validation_tests to tests/validation-tests 2025-02-23 14:06:34 -05:00
Connor Fitzgerald
31eb329748 Make tests/compile_tests into tests/compile-tests 2025-02-23 14:06:34 -05:00
Connor Fitzgerald
c4114e7347 Rename tests/tests to tests/gpu-tests 2025-02-23 14:06:34 -05:00
Connor Fitzgerald
ab0e4b1b6f Refactor Validation Tests a Bit (#7199) 2025-02-23 12:57:19 -05:00
Jamie Nicol
7e42040fa5 Add validation tests ensuring destroyed textures and buffers cause submission to fail (#7181) 2025-02-19 10:09:17 -05:00
Connor Fitzgerald
e590555a8c test: use spirv-as instead of pre-assembled SPIR-V (#7157) 2025-02-17 14:48:09 -05:00