Commit Graph

8494 Commits

Author SHA1 Message Date
teoxoy
2aac44bb73 [d3d12] don't fallback on FXC if DXC failed to load 2024-12-02 16:45:13 +01:00
dependabot[bot]
74fe56fa83 chore(deps): bump the patch-updates group across 1 directory with 45 updates (#6640)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-12-02 00:50:00 -05:00
atlv
d5253be7fd rename TFFF::STORAGE_READ_WRITE to STORAGE_WRITE (#6622) 2024-12-01 23:26:47 -05:00
dependabot[bot]
131d08e6e1 chore(deps): bump JamesIves/github-pages-deploy-action from 4.6.9 to 4.7.1 (#6638)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 23:24:14 -05:00
Douglas Dwyer
be02606118 Static linking for DXC via mach-dxcompiler (#6574) 2024-12-01 23:14:10 -05:00
atlv
5e52a313b9 rename TFC::STORAGE to STORAGE_WRITE (#6621) 2024-12-01 16:53:27 -06:00
Jim
61dc75edc5 Allow CAMetalLayer images to be used as storage textures (#6603) 2024-12-01 16:11:11 -06:00
Jim Blandy
1ea5498038 [naga] Leave Module as the last thing in naga/src/lib.rs.
Move the definitions of `RayFlag` and `RayQueryIntersection` above the
definition of `Module`, so that `Module` remains the last definition
in `lib.rs`. This is helpful for navigation.

This commit is purely code motion, and makes no changes to
functionality.
2024-11-28 11:48:46 +01:00
Teodor Tanasoaia
1a643291c2 Simplify WeakVec (#6587)
* simplify `WeakVec`

* iterate backwards & avoid rescans

Co-authored-by: Jim Blandy <jimb@red-bean.com>

---------

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-11-27 07:16:11 -08:00
Dzmitry Malyshau
314e196c90 Implement candidate intersections 2024-11-27 11:49:32 +01:00
Dzmitry Malyshau
051efbe594 Changelog entry for Ray Query constants 2024-11-27 11:49:32 +01:00
Dzmitry Malyshau
cdcba54d06 Declare ray flags in IR, parse all of them in WGSL 2024-11-27 11:49:32 +01:00
Jim Blandy
8fce9f6191 [core] Make insert_or_merge a method of BufferUsageScope.
Change `wgpu_core::track::buffer::insert_or_merge` into a
method of `BufferUsageScope`, replacing three arguments with `self`.
2024-11-27 02:00:03 -05:00
Jim Blandy
eaa5fea40d [core] Make insert_or_barrier_update a method of BufferTracker.
Change `wgpu_core::track::buffer::insert_or_barrier_update` into a
method of `BufferTracker`, and replace four arguments with `self`.
2024-11-27 02:00:03 -05:00
Erich Gubler
170f457f71 refactor: handle 2024-08 spec. rename for image copy APIs in deno_webgpu/ 2024-11-26 23:16:35 -05:00
Erich Gubler
9436d56271 feat(types): add deprecated type aliases for idents. in 2024-08 spec. rename 2024-11-26 23:16:35 -05:00
Erich Gubler
c05aa105f2 refactor!: handle 2024-08 spec. rename of image copy APIs
This commit was authored by running the following Nushell script, using
the `nu` binary and the lovely `fastmod` tool:

```nushell
# Copy-pasted from the OP in [`gpuweb`#4838](https://github.com/gpuweb/gpuweb/pull/4838).
let renames_table = '
Type 	Old 	New 	Used in
dict 	GPUImageDataLayout 	GPUTexelCopyBufferLayout 	"writeTexture,
parent type of ↙"
dict 	GPUImageCopyBuffer 	"GPUTexelCopyBufferInfo
extends ↑" 	T2B, B2T
dict 	GPUImageCopyTexture 	GPUTexelCopyTextureInfo 	T2B, B2T, T2T, writeTexture
dict 	GPUImageCopyTextureTagged 	"GPUCopyExternalImageDestInfo
extends ↑" 	copyExternalImageToTexture
dict 	GPUImageCopyExternalImage 	GPUCopyExternalImageSourceInfo 	copyExternalImageToTexture
union 	GPUImageCopyExternalImageSource 	GPUCopyExternalImageSource 	member of ↖
'

let renames_table = $renames_table
  | from tsv
  | select 'Old ' 'New '
  | rename old new
  | update new { $in | lines | get 0 } # only the first line has the renamed symbol identifier
  | update old { strip_gpu_prefix | str trim }
  | update new { strip_gpu_prefix | str trim }
  | sort-by old | reverse # Replace most specific symbol names first (some have the same "word segments" but with fewer segments)

def strip_gpu_prefix []: string -> string {
  $in | str replace --regex '^GPU' ''
}

# Rename image APIs.
for entry in $renames_table {
  fastmod --accept-all --fixed-strings $entry.old $entry.new --iglob '!CHANGELOG.md' --iglob "!xtask/src/vendor_web_sys.rs" --iglob '!wgpu/src/backend/webgpu/webgpu_sys/' --iglob '!deno_webgpu/' --iglob '!wgpu/src/backend/webgpu.rs'
}
cargo fmt
```

…and cleaning up `deno_webgpu/`'s Rust compilation errors.
2024-11-26 23:16:35 -05:00
Jasper St. Pierre
7fff667c5a [glsl-in] Don't reinterpret function arguments twice in the normal case
We already lowered the function expression if it's a normal in argument; no need to do it again. This eliminates an unused variable and expression. With chained function calls, this could lead to a lot of waste.

There's still an extra unused expression in the case of an out/inout argument; ideally we'd remove these expressions, but it might be tricky.

Fixes #6602
2024-11-26 11:32:15 -08:00
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