Commit Graph

8476 Commits

Author SHA1 Message Date
teoxoy
e2eeba7dae [wgpu-core] document which closures are guaranteed to be called 2024-11-26 20:31:18 +01:00
teoxoy
14af686b9f Remove device_unregister_device_lost_closure 2024-11-26 20:31:18 +01:00
teoxoy
86656e182b simplify DeviceLostClosure by removing its C variant 2024-11-26 20:31:18 +01:00
teoxoy
13fbf30813 simplify BufferMapCallback by removing its C variant 2024-11-26 20:31:18 +01:00
teoxoy
8e4622b399 simplify SubmittedWorkDoneClosure by removing its C variant 2024-11-26 20:31:18 +01:00
teoxoy
f4bdd1cb65 remove Dropped & ReplacedCallback variants of DeviceLostReason 2024-11-26 20:31:18 +01:00
teoxoy
f096c66938 remove DeviceLostClosure consumed check 2024-11-26 20:31:18 +01:00
teoxoy
816e9c5856 use FnOnce instead of Fn for the device lost closure 2024-11-26 20:31:18 +01:00
sotaroikeda
9ffafcf7b8 Add Metal SharedEvent to fence if it is supported (#6610)
Co-authored-by: Sotaro Ikeda <you@example.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-11-26 19:25:07 +00:00
Sludge
a9f14c7a90 Allow 64-bit hex literals and const-evaluate unary ops (#6616)
* Allow 64-bit hex literals

* Implement const evaluation for unary 64-bit ops

* Test 64-bit hex literals

* Add changelog entry
2024-11-25 18:54:12 -08:00
Erich Gubler
3016c56db6 chore(naga): suppress irrefutable_let_patterns for EnableExtension matching in Error::as_parse_error (#6607) 2024-11-25 13:52:16 +01:00
atlv
05c9f43fa8 Fix atomic storage global use acces (#6600) 2024-11-25 12:06:12 +01:00
Andreas Reich
29bb44b19a Bump version & update changelog following 23.0.1 patch release (#6612)
* put in missing v22.1.0 changelog

* bump wgpu, wgpu-core, wgpu-hal to 23.0.1

* add changelog for v23.0.1, remove lines from v24 line
2024-11-25 09:54:49 +01:00
Erich Gubler
96c855b7ed chore: satisfy elided_named_lifetimes lint 2024-11-25 03:36:18 -05:00
Erich Gubler
9a43938e11 chore: satisfy clippy::manual_is_power_of_two
This only fires with Rust 1.83 or newer, but we can preempt this case
with our current MSRV.
2024-11-25 03:36:18 -05:00
Erich Gubler
e9b340d4d0 chore: satisfy clippy::manual_unwrap_or_default
This only fires with Rust 1.83 or newer, but we can preempt this case
with our current MSRV.
2024-11-25 03:36:18 -05:00
Erich Gubler
13a533022e chore: satisfy clippy::manual_div_ceil
This only fires with Rust 1.83 or newer, but we can preempt this case
with our current MSRV.
2024-11-25 03:36:18 -05:00
Erich Gubler
3032e9a43c chore: satisfy clippy::needless_lifetimes
These new cases only fire with Rust 1.83 or newer, but we can preempt
this case with our current MSRV.
2024-11-25 03:36:18 -05:00
Erich Gubler
8cf72dec8e chore: satisfy clippy::doc_lazy_continuation 2024-11-25 03:36:18 -05:00
Erich Gubler
ca410afb5f chore: satisfy clippy::assigning_clones
Started firing with Rust 1.78.0, but we can preempt it with our current
MSRV.
2024-11-25 03:36:18 -05:00
atlv
c22c062b54 fix typo (#6597) 2024-11-23 18:03:41 -05:00
Elie Michel
c54a159bab Improve binding error (#6553)
* Improve binding error

* Introduce a new BindingTypeName enum

* Fix formatting

* Use From trait instead of map functions for BindingTypeName

* Update CHANGELOG.md
2024-11-22 21:11:22 -05:00
atlv
b75f46cfbe fix typo (#6591) 2024-11-22 21:09:48 -05:00
atlv
e05e46c429 bump metal (#6592) 2024-11-22 21:09:22 -05:00
atlv
a0ea3050fd minor cleanup (#6593) 2024-11-22 20:51:50 -05:00
Teodor Tanasoaia
47bfede63f Add device_unregister_device_lost_closure (#6588)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-11-22 19:49:47 +00:00
Erich Gubler
19d80fe229 refactor(core): extract Global::validate_pass_timestamp_writes 2024-11-22 13:50:29 -05:00
Erich Gubler
29e7fe3fe2 fix(core): validate that at least one pass timestamp write index is specified 2024-11-22 13:50:29 -05:00
Erich Gubler
b1ca9dfd1f chore: hoist std::mem::size_of import, Vulkan edition 2024-11-22 04:40:03 -05:00
Erich Gubler
a902645592 chore: satisfy unused_qualifications again, Vulkan edition 2024-11-22 04:40:03 -05:00
Samson
40fd5245df Update glow to 0.16 (#6586)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-22 08:49:03 +00:00
Erich Gubler
6365e2dd75 fix(core): validate dst_buffer isn't destroyed when resolving query sets 2024-11-21 23:23:15 -05:00
Erich Gubler
f1ec934dbc fix(core): validate that begin and end indices of pass timestamp writes are not equal 2024-11-21 23:22:15 -05:00
Erich Gubler
be50bdfc18 fix(core): validate bounds of pass timestamp writes' indices 2024-11-21 23:22:15 -05:00
Erich Gubler
ce1d6e4173 refactor: destructure timestamp writes in command_encoder_create_{compute,render}_pass 2024-11-21 23:22:15 -05:00
Erich Gubler
b17c30338d fix(core): validate TIMESTAMP_QUERY feature before other query set validation in pass creation 2024-11-21 23:22:15 -05:00
Xiaopeng Li
5ca92bf984 Fix leaks of WeakVec (#6576) 2024-11-21 10:47:05 +01:00
Jamie Nicol
00a6032eb7 [naga spv-out] Handle nested arrays when adding matrix decorations
Previously we only checked whether the outermost array's subtype was a
Matrix when determining whether to add ColMajor and MatrixStride
decorations, meaning arrays of arrays of matrices would not be
decorated.
2024-11-20 06:38:39 -08:00
Vecvec
6f5014f0a3 [wgpu-core/-hal] move raytracing alignments into hal (#6563) 2024-11-19 11:57:48 +01:00
fyellin
2389106a75 Fix set_push_constants for render bundles (#6540) 2024-11-19 11:12:21 +01:00
Jim Blandy
0b82776947 [naga msl-out] Avoid UB by making all loops bounded.
In MSL output, avoid undefined behavior due to unbounded loops by
adding an unpredictable, never-actually-taken `break` to the bottom of
each loop body, rather than adding an unpredictable,
never-actually-taken branch over each loop.

This will probably have more of a performance impact, because it
affects each iteration of the loop, but unlike branching over the
loop, which leaves infinite loops (and thus undefined behavior) in the
output, this actually ensures that no loop presented to Metal is
unbounded, so that there is no undefined behavior present that the
optimizer could use to make unwelcome inferences.

Fixes #6528.
2024-11-18 14:10:50 -08:00
Erich Gubler
e59f00399e fix(wgsl-in): include user and unknown rules in diagnostic(…) tracking 2024-11-18 17:10:07 -05:00
Erich Gubler
1fc5e4027a refactor: remove ConflictingDiagnosticRuleError::triggering_rule
Did this to decrease size of `ConflictingDiagnosticRuleError`, which
would have gotten even bigger in a subsequent commit.
2024-11-18 17:10:07 -05:00
Erich Gubler
ffc2a1e9a0 diag(wgsl-in): fix plurality agreement for conflicting diagnostic rules 2024-11-18 17:10:07 -05:00
Erich Gubler
f6f0e5dbc2 refactor(naga): unimpl. Copy for FilterableTriggeringRule 2024-11-18 17:10:07 -05:00
Jamie Nicol
6f528e2ebc [wgsl-in] Reject invalid texture types for textureSampleBias (#6566)
Non-sampled textures are not allowed, and neither are 1 dimensional
textures.
2024-11-18 17:37:52 +01:00
Jamie Nicol
baecb5fbf1 [wgsl-in] Ensure textureSampleLevel's level argument is an integer for depth textures (#6529)
Until now we accepted a float, as is the case for non-depth textures.
This makes us compliant with the spec.

The validator is updated to expect an Sint or Uint when the ImageClass
is ImageClass::Depth. The SPIR-V frontend converts the LOD argument
from float to Sint (assuming that it is representable), likewise The
SPIR-V backend now converts the LOD from either Sint or Uint to
Float. HLSL and MSL backends require no changes as they implicitly do
that conversion. GLSL does not support non-compare LOD samples,
therefore no changes are required.
2024-11-18 12:05:04 +00:00
Jim Blandy
c110bf22d8 docs(diagnostic_filter): add more words to DiagnosticFilterMap
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-11-15 16:11:07 -08:00
Teodor Tanasoaia
1abf3fe90e remove unused enum variants (#6550) 2024-11-15 14:25:18 +01:00
Erich Gubler
92ca5a3850 feat(wgsl-in): parse diagnostic attrs. on fns 2024-11-15 07:44:14 -05:00