Commit Graph
1200 Commits
Author SHA1 Message Date
Vecvec 74f3a2f919 [vulkan] allocate descriptors for acceleration structures (#6861) 2025-01-06 15:37:13 -05:00
Connor Fitzgerald 111a6a8ed1 Small Fix to Mutex Init (#6846) 2025-01-03 09:52:48 +01:00
Xiaopeng Li 15a77b525c expose VULKAN_EXTERNAL_MEMORY_WIN32 feature (#6825) 2025-01-02 19:48:54 -05:00
Andreas Reich c46624f1fa Fix filtering out dx12 software adapters (#6843) 2025-01-02 14:36:23 -05:00
Benjamin Frye 4772cd8c63 fix(dxgi): DX12 exception handler lifetime based on device not adapter (#6828) 2024-12-26 11:06:50 -05:00
Vecvec 7b5a348c7c Set index type to NONE in get_acceleration_structure_build_sizes (#6802) 2024-12-23 17:20:26 -05:00
Erich Gubler b2c9b0af5a chore: add web_sys_unstable_apis to lints.rust.unexpected_cfgs.check-cfg in wgpu_{hal,types} 2024-12-17 13:30:52 -05:00
Teodor Tanasoaia 04a10405b3 [d3d12] fix being able to use dispatchWorkgroupsIndirect without validation (#6767) 2024-12-17 17:10:00 +01:00
Erich Gubler 964a8d99d2 chore: satisfy clippy::unnecessary_map_or (#6710)
Started firing in Rust 1.84.
2024-12-16 17:26:12 -05:00
Connor Fitzgerald 89a8867f9b Enable Partial Binding on DX12 (#6734) 2024-12-16 15:47:19 +00:00
Christofer Nolander 21ff9686a7 Add 1-component ({s,u}{int,norm}{8,16}, float16) and unorm8x4-bgra vertex formats (#6632)
* feat: add missing 8/16-bit vertex formats (and 8-bit bgra) #6614

* add tests for 1-component vertex formats (and bgra)

* metal: unpacking function for 1-component vertex formats

* test: use proper alignment for float16 vertex format

* changelog: new vertex formats
2024-12-16 10:18:50 -05:00
Connor Fitzgeraldandrudderbucky 411ffa7a5a Make Force Loop Bounding Optional (#6662)
* Make Force Loop Bounding Optional

Co-authored-by: rudderbucky <anandkwork7@gmail.com>

* Deprecate and Rename

---------

Co-authored-by: rudderbucky <anandkwork7@gmail.com>
2024-12-16 04:23:22 -05:00
Connor Fitzgerald 7f1e45ff88 Fix Test Failure on AMD GL (#6726) 2024-12-16 04:13:12 -05:00
Connor Fitzgerald fdb6266d36 Update Some Repository Documentation (#6708)
* Update Some Repository Documentation

* Capitalization
2024-12-12 04:54:42 +00:00
atlv 55d5d26835 Renumber bitflags sort (#6709) 2024-12-12 00:32:55 +00:00
atlvandErich Gubler 5543961a71 Replace Range<T> with StateTransition<T> (#6703)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-12-11 16:11:39 +01:00
Teodor Tanasoaia dc5bd9dbac Remove BufferUses::STORAGE_WRITE_ONLY (#6691) 2024-12-11 02:15:11 -05:00
Teodor TanasoaiaandErich Gubler a1fc2ba76d fix being able to use storage textures without TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES (#6690)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-12-10 15:34:38 -05:00
Andreas Reich ed694eda89 Improve logging around surface creation (#6511)
* additional debug logging for request_adapter, demote some messages to debug

* unrelated log messages that annoyed me in Vulkan: debug utils disabled is now `debug`, it being enabled is `info`

* document compatible_surface requirement for WebGL directly on wgt::RequestAdapterOptions

* make adapterenumarge_adapters & request_adapters results info log again when api_log is enabled
2024-12-08 14:44:55 +01:00
Marijn Suijten 76f307c92f Remove stale references to d3d12 bindings wrapper crate (#6675)
While looking through some recent activity for the D3D12 crate, in
particular a spelling fix for the crates.io link to `d3d12`, I realized
that I completely forgot to remove these references to the now unused
and removed `d3d12` crate in #5956.
2024-12-06 11:57:05 +01:00
atlv 0b6571a68d Align Storage Access enums to spec (#6642) 2024-12-03 17:37:23 +01:00
teoxoyandErich Gubler ba416c1dad remove hal::Device::destroy_command_encoder, use Drop implementations instead
Co-Authored-By: Erich Gubler <erichdongubler@gmail.com>
2024-12-02 15:59:14 -08:00
teoxoy 5b9c526c55 [d3d12] don't expose adapter if it doesn't support DXIL when the DXC container is present 2024-12-02 16:45:13 +01:00
teoxoy 201d9ea79f [d3d12] remove complex DXC loading rules 2024-12-02 16:45:13 +01:00
teoxoy 2aac44bb73 [d3d12] don't fallback on FXC if DXC failed to load 2024-12-02 16:45:13 +01: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
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
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
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 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 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
atlv a0ea3050fd minor cleanup (#6593) 2024-11-22 20:51:50 -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
Vecvec 6f5014f0a3 [wgpu-core/-hal] move raytracing alignments into hal (#6563) 2024-11-19 11:57:48 +01:00
François Mockers 4681f4ffba Fix iOS crash: don't set autoresizing mask (#6535) 2024-11-15 08:18:11 +00:00
teoxoy d489e4c2e8 remove hal::Device::exit, add Drop implementations to Device and Queue instead 2024-11-14 06:27:37 -08:00
teoxoy 394bf37f98 expect to timeout when targeting WebGL 2024-11-14 06:27:37 -08:00
Andreas Reich ae6c6fbea4 Fix Vulkan surface capabilities being advertised when its query failed. (#6510)
* distinguish `GetSurfaceSupportError` between backend unsupported and failing to get surface caps

* Fix vulkan backend returning invalid surface configuration

* changelog entry
2024-11-12 23:51:07 +01:00
79a6f2cd31 Ray Queries (#6291)
* fix more compile errors

* fix err

* fix all compile errors

* fix clippy errors

* fix issues in ray-traced-triangle example

* fix clippy warnings

* fix wasm not compiling

* fix test

* fix clippy (again)

* fix some rustfmt issues

* fix more rustfmt issues

* fix even more rustfmt issues

* fix yet more rustfmt issues

* add #[allow(dead_code)] to some structs to fix clippy on web assembly

* more format fixes

* even more format fixes

* close to final format fixes

* final format fixes (hopefully)

* actual final format fixes (hopefully)

* move ray_cube_cube example and fix bugs

* move other examples

* fix crash when dropping

* fix test

* apply clippy and rustfmt changes

* fix some memory leaks

* fix incompatibility with new wgpu trunk changes

* fix clippy & fmt

* fix clippy errors on github

* update to trunk

* remove a line that printed log "Created blas ..." in device create tlas

* fix merge issues

* fix merge

* fix fmt

* restored example ray scene functionality

* WIP fix rebase

* Fix compile issues

* More fixes

* Fix rebase

* Add wgls backend write_value_type AccelerationStructure

* Add back xtask Cargo.lock

* Revert serde path

* Doc typos

* Add -diff

* Revert more serde

* Revert serde again?

* Fix doc typo

* add test

* clippy & fmt

* fix error "blas does not exist"

* fix various things

* fix unused acceleration structures causing invalid SPIR-V

* fix merge

* fix use after free in a different way (now moved tlas instances to wgpu_core)

* refactor & fmt

* remove accidentally created file

* remove accidentally created file (actually)

* merge & fix

* Fix problems

* fix validation error

* fix validation

* fix merge

* fmt

* fix merge

* use staging buffer trackers in creating the ray-tracing staging buffers (not the tlas_s)

* change one missed staging buffer's tracker

* wip: example

* finished shadow!

* fix merge

* clippy

* remove some uses of blas ids

* fmt

* fix merge

* deduplicate code shared between command_encoder_build_acceleration_structures and command_encoder_build_acceleration_structures_unsafe_tlas

* clippy

* fix merge

* fix warnings

* clippy & fmt

* re-add matching to get_raw_tlas_instance_size and tlas_instance_into_bytes

* fmt

* fix command

* wip: fix merge

* fix merge

* fmt & docs

* fix wasm clippy

* fix issues with tests

* fix issues with tests

* fmt & clippy (wasm)

* wip ray-traced-triangle (non hal)

* unify camera location in ray_shadows

* fix tests

* add readme to ray_traced_triangle

* note that vertex format must be f32x3 (not yet validated)

* changelog

* require VertexFormat::Float32x3

* fix compile error

* when creating and building acceleration structures require Features::RAY_TRACING_ACCELERATION_STRUCTURE is enabled

* remove duplicate workaround

* fix most feedback

* remove all changes from .gitattributes

* fix compile error in test

* more changes along same lines

* format

* apply feedback to more places

* fix `cargo clippy` not just `cargo clippy --all-features`

* cache max instances from tlas creation

* fix clippy

* fix examples

* fix tests

* remove now useless docs

* add more docs

* yet more docs

* still more docs

* Documentation.

* Running out of unique commit messages to say writing docs.

* Add more references to docs.

* Get BindGroup in scope

* Remove unintentional changes

* Remove #[allow(dead_code)]

* Remove old comments

* Add device.poll

* make ray_scene start right way up

* fmt

* move scratch buffer to its own module

* actually remove intentional changes (turns out wgt is inconsistent)

* use better names in ray_scene/shader.wgsl

* fmt

* remove more unintentional changes.

* work on ray_tracing use after free

* spelling

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* grammar

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* move things into struct (should be all vectors with 3 item types or more)

* remove long-standing locks.

* fmt

* move not using index buffer to test

* impl index & index mut for tlas package

* impl index & index mut for tlas package

* fix errors

* fix test errors

* move everything out of ray_tracing.rs

* more index_mut

* fmt

* fix docs links

* move to separate impl block

* fix older request review

* fmt

* remove missed deref

* fix wasm clippy

* change to suggestions

* fmt

* add a note as to why `command_encoder_build_acceleration_structures_unsafe_tlas` and `command_encoder_build_acceleration_structures` are currently separate

* add a todo to reconsider soon `command_encoder_build_acceleration_structures_unsafe_tlas`

* switch to mat4 in ray-tracing examples

* Combine RT Tests Under Single Submodule

* Add More Raytracing Tests and Re-Organize

* Documentation and Formatting Fixes

* Remove Forced Alignment in wgpu-hal

* work on out_of_order_as_build and add out_of_order_as_build_use

* fmt

* update test label naming

* fix one validation error

* fix clippy & fmt

* add acceleration structure creation tests

* make mis-matched index test use the correct function

* move validation into validate_command_buffer

* fix tests

* add blas and tlas to pending writes to remove (now unneeded) `device.poll()`s

* remove commented out code from examples and properly use the constants in ray_shadow

* add examples to examples\README.md

* rename ray tracing to ray queries in readme

* remove unneeded usage from scratch buffer creation

* use snatchables for raw acceleration structures

* format

* add EXPERIMENTAL_ to features

* fix missed comment

---------

Co-authored-by: Daniel Keitel <daniel.mg.keitel@fau.de>
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
Co-authored-by: atlas dostal <rodol@rivalrebels.com>
Co-authored-by: vero <email@atlasdostal.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-11-09 17:59:48 +00:00
Adam WiniarczukandAdam Winiarczuk b89a57f8ca Dx12 HAL texture: expose raw resource (#6502)
Co-authored-by: Adam Winiarczuk <tsu@liv.tv>
2024-11-08 18:54:10 +01:00
David Ellis 080d99b5bf Fix Issue 6467: Prevent MacOS crash on invalid workgroup size definition (#6494) 2024-11-05 14:21:33 +01:00
Jerzy Wilczek 4e47ba4ac0 [wgpu-hal] Change the DropCallback API to use FnOnce instead of FnMut (#6482) 2024-10-31 11:28:41 -04:00
Erich Gubler 08c9d8c397 chore: bump WGPU workspace crates to 23 2024-10-30 07:14:10 -07:00
Xiaopeng Li 8b99c3c4f5 Vulkan: create texture from d3d11 shared handle (#6161) 2024-10-30 03:48:06 +00:00
teoxoy 9c781d64d6 [metal] use restrict bounds check policy by default 2024-10-23 16:51:44 +02:00
teoxoy 207747cab5 [hlsl-out] add support for restricting indexing to avoid OOB accesses 2024-10-23 16:51:44 +02:00