Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wgpu-hal] Inline RayQuery Support #3507

Merged
merged 57 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
cd16e71
Initial commit
expenses Sep 3, 2022
ae4dcfe
Woo! building an AS works
expenses Sep 11, 2022
98cf75b
Fix alignment for amdpro driver
expenses Sep 11, 2022
6655d23
Ray tracing works in shaders!
expenses Sep 12, 2022
3be84cb
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
expenses Sep 12, 2022
2cc4385
Major clean up, allow for acceleration structure updates
expenses Sep 15, 2022
cd7c807
Fix trait implementaiton on gles
expenses Sep 15, 2022
4ef32a4
Put larger function call param lists into descriptors for easier dumm…
expenses Sep 15, 2022
8318b5f
Fix wasm build
expenses Sep 15, 2022
fecb538
Shuffle some code around, add a dummy implementation for DX12 with so…
expenses Sep 15, 2022
7905dc5
Add dummy implementation for metal
expenses Sep 16, 2022
e786743
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
expenses Sep 18, 2022
6f2b07a
Fix example, hopefully have fixed metal code
expenses Sep 18, 2022
9aca7f2
Merge branch 'hal-acceleration-structures' of github.com:expenses/wgp…
expenses Sep 18, 2022
3828af7
Changed surface_format in example.
daniel-keitel Feb 3, 2023
e2de5a3
Changed based on PR 3020#pullrequestreview-1139691697 feedback.
daniel-keitel Feb 3, 2023
112b549
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Feb 21, 2023
074ebe5
unsafe blocks in unsafe functions
daniel-keitel Feb 21, 2023
8ce204b
formatted code
daniel-keitel Feb 21, 2023
f52a70b
added utility functions to AccelerationStructureInstance (bit packing)
daniel-keitel Feb 22, 2023
f15e865
WIP api change build_acceleration_structures
daniel-keitel Feb 27, 2023
a3c0ffb
preperation for changes in get_acceleration_structure_build_sizes
daniel-keitel Feb 28, 2023
a59d888
WIP api change get_acceleration_structure_build_sizes
daniel-keitel Feb 28, 2023
93a347d
added aabbs and geometry flag support
daniel-keitel Mar 1, 2023
16cc4eb
fixed RAY_TRACING feature collision
daniel-keitel Mar 1, 2023
5b84238
renamed to build_acceleration_structure
daniel-keitel Mar 1, 2023
caa4ae7
fixed missing type parameter for metal
daniel-keitel Mar 1, 2023
ca3a54c
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Mar 1, 2023
ca03f34
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Mar 16, 2023
bee8a36
multiple AS builds at once
daniel-keitel Mar 19, 2023
a420b87
switched to using smallvec
daniel-keitel Mar 19, 2023
e48f7bd
small api change + documentation
daniel-keitel Mar 19, 2023
c1dc803
added to changelog
daniel-keitel Mar 19, 2023
9c67400
typo
daniel-keitel Mar 20, 2023
c91ce76
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Mar 27, 2023
f5e94e7
moved flags to wgt
daniel-keitel Mar 27, 2023
0b7e728
renamed feature RAY_TRACING to RAY_TRACING_ACCELERATION_STRUCTURE
daniel-keitel Mar 27, 2023
07dae89
iterators as inputs
daniel-keitel Mar 30, 2023
f2ada4d
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Apr 1, 2023
1515bad
clippy
daniel-keitel Apr 1, 2023
5a155b4
added acceleration structure barriers
daniel-keitel Apr 5, 2023
e4f4ec4
added blas input alignment requirement
daniel-keitel Apr 7, 2023
037ed71
Merge commit '66c029f172af69d012d11f863d3c08eefa8f6395' into hal-acce…
daniel-keitel Apr 30, 2023
fec5e40
Merge remote-tracking branch 'origin/trunk' into HEAD
expenses Jul 24, 2023
cadea32
Small post-merge fixes
expenses Jul 24, 2023
52e1099
Merge commit '1ced67f05611c62f31aaf97cbbdc183ba6247bb9' into hal-acce…
JMS55 Aug 25, 2023
308cac8
Fix example
JMS55 Aug 25, 2023
24ec2fe
Update lockfile
JMS55 Aug 26, 2023
bcb646e
Misc fix
JMS55 Aug 26, 2023
1bcbfaa
Fix metal backend
JMS55 Aug 26, 2023
384767a
Misc docs
JMS55 Aug 26, 2023
a919529
Merge branch 'trunk' into hal-acceleration-structures
cwfitzgerald Sep 15, 2023
a09d116
fixed rt hal example after trunk merge
daniel-keitel Sep 16, 2023
34995ae
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Nov 11, 2023
77acca5
implemented requested changes
daniel-keitel Dec 1, 2023
efc6d90
Merge remote-tracking branch 'origin/master' into hal-acceleration-st…
daniel-keitel Dec 1, 2023
8209991
Merge remote-tracking branch 'upstream/trunk' into hal-acceleration-s…
cwfitzgerald Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,20 @@ By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671).
- Change type of `bytes_per_row` and `rows_per_image` (members of `ImageDataLayout`) from `Option<NonZeroU32>` to `Option<u32>`. By @teoxoy in [#3529](https://github.com/gfx-rs/wgpu/pull/3529)
- On Web, `Instance::create_surface_from_canvas()` and `create_surface_from_offscreen_canvas()` now take the canvas by value. By @daxpedda in [#3690](https://github.com/gfx-rs/wgpu/pull/3690)

### Added/New Features

#### General
- Added feature flags for ray-tracing (currently only hal): `RAY_QUERY` and `RAY_TRACING` @daniel-keitel (started by @expenses) in [#3507](https://github.com/gfx-rs/wgpu/pull/3507)

#### Vulkan

- Implemented basic ray-tracing api for acceleration structures, and ray-queries @daniel-keitel (started by @expenses) in [#3507](https://github.com/gfx-rs/wgpu/pull/3507)

#### Hal

- Added basic ray-tracing api for acceleration structures, and ray-queries @daniel-keitel (started by @expenses) in [#3507](https://github.com/gfx-rs/wgpu/pull/3507)


### Changes

#### General
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions wgpu-core/src/binding_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ impl BindingTypeMaxCountValidator {
wgt::BindingType::StorageTexture { .. } => {
self.storage_textures.add(binding.visibility, count);
}
wgt::BindingType::AccelerationStructure => todo!(),
}
}

Expand Down
2 changes: 2 additions & 0 deletions wgpu-core/src/device/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@ impl<A: HalApi> Device<A> {
},
)
}
Bt::AccelerationStructure => todo!(),
};

// Validate the count parameter
Expand Down Expand Up @@ -2136,6 +2137,7 @@ impl<A: HalApi> Device<A> {
buffers: &hal_buffers,
samplers: &hal_samplers,
textures: &hal_textures,
acceleration_structures: &[],
};
let raw = unsafe {
self.raw
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ features = ["wgsl-in"]
[dev-dependencies]
cfg-if = "1"
env_logger = "0.10"
glam = "0.24.2" # for ray-traced-triangle example
winit = { version = "0.29.4", features = [
"android-native-activity",
] } # for "halmark" example
Expand Down
2 changes: 2 additions & 0 deletions wgpu-hal/examples/halmark/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ impl<A: hal::Api> Example<A> {
buffers: &[global_buffer_binding],
samplers: &[&sampler],
textures: &[texture_binding],
acceleration_structures: &[],
entries: &[
hal::BindGroupEntry {
binding: 0,
Expand Down Expand Up @@ -475,6 +476,7 @@ impl<A: hal::Api> Example<A> {
buffers: &[local_buffer_binding],
samplers: &[],
textures: &[],
acceleration_structures: &[],
entries: &[hal::BindGroupEntry {
binding: 0,
resource_index: 0,
Expand Down
Loading
Loading