Commit Graph

2167 Commits

Author SHA1 Message Date
teoxoy
597114052e [d3d12] get vertex_index & instance_index builtins working for indirect draws 2025-04-15 17:56:17 +02:00
Teodor Tanasoaia
78d05f5f71
[core] check that indirect buffers have not been destroyed (#7534) 2025-04-14 11:06:32 -04:00
Connor Fitzgerald
45d8f42513 Use workspace package information everywhere 2025-04-10 20:41:28 -04:00
Bruce Mitchener
dde9422114
Fix build with profiling enabled (#7509) 2025-04-11 00:34:05 +00:00
Bruce Mitchener
3081c4f094
Fix typos (#7510) 2025-04-10 15:09:03 -04:00
Connor Fitzgerald
8c2c2ce203
Release v25 (#7505) 2025-04-10 16:13:02 +00:00
Vecvec
8010203281 Rework acceleration structure build tracking. 2025-04-09 22:27:04 -04:00
Vecvec
382a1e3c9b Make submission index lockable. 2025-04-09 22:27:04 -04:00
Vecvec
1c4b73c098
Implement as_hal for BLASes and TLASes (#7303) 2025-04-09 14:50:43 -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
Vecvec
e8e66afb72
Fix new acceleration structure building validation errors. (#7486) 2025-04-07 15:17:06 +02:00
Connor Fitzgerald
c860a2cf8c
Rename and unsafe start_capture -> start_graphics_debugger_capture (#7470)
* Improve `start_capture` docs

* Docs
2025-04-03 13:07:22 -04: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
Josh Groves
ab38e8e430
Avoid overflows for extreme scissor coordinates (#7459) 2025-04-01 09:47:39 -04:00
Connor Fitzgerald
a9279de793
Fix assorted issues with WebGL (#7448)
* Fix validation error when configuring the surface on WebGL

* Remove unneeded `webgl` feature

* Fix compilation of the `noop` backend on `wasm32`

* Prevent `webgpu` examples from incorrectly falling back to WebGL

* Reduce dependency set when building wasm examples

* Fix various warnings
2025-03-31 22:02:21 -04:00
Erich Gubler
1d4740e89d build: upgrade ron 0.8.1 → 0.9.0 2025-03-26 16:03:03 -04:00
teoxoy
9a2b5fdb70 abstract away usage of scratch space for buffer barriers and unique index iterators 2025-03-26 18:26:31 +00:00
teoxoy
3705928273 [validate_draw] refactor out an is_bit_set function 2025-03-26 18:26:31 +00:00
teoxoy
7d15c511de move indirect validation code to its own folder
rename items appropriately
internalize indirect buffer bind groups
2025-03-26 18:26:31 +00:00
teoxoy
ef622c1061 validate multi draw indirect calls 2025-03-26 18:26:31 +00:00
teoxoy
0285e60984 Replace the indirect-validation feature with InstanceFlags::VALIDATION_INDIRECT_CALL.
With the only caveat that device creation will now panic if the `wgsl` feature is not enabled, `InstanceFlags::VALIDATION_INDIRECT_CALL` is set and the device supports `DownlevelFlags::INDIRECT_EXECUTION`.
2025-03-26 18:26:31 +00:00
teoxoy
53c2d15e0b implement indirect draw validation 2025-03-26 18:26:31 +00:00
Erich Gubler
299079fb69
chore: remove unnecessarily allow'd unused_braces (#7416) 2025-03-24 22:23:24 +00:00
Bruce Mitchener
ccaf9a84f8
Fix clippy::implicit_saturating_sub lints (#7395) 2025-03-22 13:17:34 -04:00
Bruce Mitchener
edd0ef80af
Fix clippy::manual_repeat_n lints (#7394) 2025-03-22 16:18:34 +00:00
Bruce Mitchener
b7e7d7ce7a
Fix clippy::manual_contains lints (#7384) 2025-03-20 21:55:52 -04:00
Connor Fitzgerald
4687973c9a
Use bytemuck instead of slice::from_raw_parts for transmutes (#7376) 2025-03-19 22:05:21 -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
Erich Gubler
4db992a66d
refactor(core): avoid manually reimplemented sort_by_key (#7366) 2025-03-18 17:43:04 -04:00
SupaMaggie70Incorporated
e8ce3ae973
Add mesh shader stages to wgt::ShaderStages and naga::ShaderStage (#7292)
* Initial changes

* Fixed metal backend in wgpu-hal, ran tests
2025-03-15 05:34:20 +00: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
Kevin Reid
16d41cfaf3
Make std usage optional for wgpu-core. (#7279)
* Make `wgpu_core::snatch::LockTrace` fully instead of partially conditional.

Now, when `cfg(not(debug_assertions))`, there is no `SNATCH_LOCK_TRACE`
thread local, and `LockTrace` has no data fields.

* Make `std` usage optional for `wgpu-core`.

Adds a `std` feature, enabled by default, to `wgpu-core`. When that
feature is disabled, the following functionality is not available:

* `Send + Sync` for resources.
* `trace` feature.
* `observe_locks` feature.
* Snatch lock recursive locking assertion.
2025-03-06 14:07:38 -05:00
Matilde Morrone
7eb69f43b6
Add DRM support to Vulkan backend (#7212)
* Add basic drm support to vulkan backend

* Move vulkan drm implementation to its own module

* Properly feature gate drm support and add safety docs

* Disable drm on wasm targets

* Remove old fixme comment from vulkan drm backend

* Move cfg check inside drm module

* Use expect instead of allow for create_surface_from_drm

* Document that drm is not available on apple platforms
2025-03-04 20:53:38 +00:00
Vecvec
5b3266db23
Support getting hit vertex positions (#7183) 2025-03-04 20:06:44 +01:00
Erich Gubler
0b5197d8d0
refactor: sync. wgpu-core's allow(clippy::arc_with_non_send_sync) to wgpu (#6771) 2025-02-28 12:37:30 -05:00
Erich Gubler
6f0c2434a7 chore(hal,core): use core::{error::Error,format} instead of std
This allows `wgpu-hal` to be used in `no_std` environments, except that
currently, only the `noop` backend supports `no_std`.
In the future, `cfg(all(gles, webgl))` should also be `no_std`, but that
requires further work.

Co-Authored_by: Kevin Reid <kpreid@switchb.org>
2025-02-26 22:58:50 -05:00
Erich Gubler
c626d4f819 build: update CORE_MSRV 1.80.1 → 1.82.0 2025-02-26 22:58:50 -05:00
Erich Gubler
8774ab53d5 chore: remove std::mem::* imports now unnecessary with CORE_MSRV
`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](https://github.com/rust-lang/rust/pull/123168/).
2025-02-26 22:58:50 -05:00
Erich Gubler
18951ea3d2 build: update CORE_MSRV 1.76.0 → 1.80.1 2025-02-26 22:58:50 -05:00
Connor Fitzgerald
8fb09a5ad6
Move REPO_MSRV to 1.85 (#7218) 2025-02-24 23:39:34 -05:00
Flávio J. Saraiva
a26171b2a0
Fix compilation for targets that don't have AtomicU64. (#7118)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-02-24 22:07:13 +00:00
sagudev
705e3d60e7 [core] validate equal sample_count in copy_texture_to_texture
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-23 15:05:55 +01:00
Connor Fitzgerald
ae5dc0e7cb
Target Specific Compilation (#7076) 2025-02-22 12:38:58 +01:00
Kevin Reid
7bcbfe0712 wgpu-core: Adjust imports to allow no_std.
Dependencies on `std` that still exist:
* Locks
* `std::error::Error` (waiting for Rust 1.81)
* `std::os::raw::c_char` for FFI
* `thread_local` and `Backtrace` in `snatch`
2025-02-21 08:47:16 +01:00
Erich Gubler
6a01091397 move(core): s/create_compute_pass/begin_compute_pass/ 2025-02-17 12:42:10 -05:00
Erich Gubler
25a51606d1 move(core): s/create_render_pass/begin_render_pass/ 2025-02-17 12:42:10 -05:00
Connor Fitzgerald
194d4b1f36
New Binding Array Limit (#6952) 2025-02-17 09:22:24 -05:00