Skip to content

Commit 0f4df52

Browse files
daniel-keitelJMS55expensescwfitzgerald
authored
[wgpu-hal] Inline RayQuery Support (#3507)
Co-authored-by: JMS55 <[email protected]> Co-authored-by: Ashley Ruglys <[email protected]> Co-authored-by: Connor Fitzgerald <[email protected]>
1 parent 3e0fb2c commit 0f4df52

File tree

27 files changed

+2351
-10
lines changed

27 files changed

+2351
-10
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,20 @@ By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671).
715715
- 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)
716716
- 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)
717717

718+
### Added/New Features
719+
720+
#### General
721+
- 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)
722+
723+
#### Vulkan
724+
725+
- 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)
726+
727+
#### Hal
728+
729+
- 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)
730+
731+
718732
### Changes
719733

720734
#### General

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wgpu-core/src/binding_model.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ impl BindingTypeMaxCountValidator {
341341
wgt::BindingType::StorageTexture { .. } => {
342342
self.storage_textures.add(binding.visibility, count);
343343
}
344+
wgt::BindingType::AccelerationStructure => todo!(),
344345
}
345346
}
346347

wgpu-core/src/device/resource.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,7 @@ impl<A: HalApi> Device<A> {
16421642
},
16431643
)
16441644
}
1645+
Bt::AccelerationStructure => todo!(),
16451646
};
16461647

16471648
// Validate the count parameter
@@ -2136,6 +2137,7 @@ impl<A: HalApi> Device<A> {
21362137
buffers: &hal_buffers,
21372138
samplers: &hal_samplers,
21382139
textures: &hal_textures,
2140+
acceleration_structures: &[],
21392141
};
21402142
let raw = unsafe {
21412143
self.raw

wgpu-hal/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ features = ["wgsl-in"]
169169
[dev-dependencies]
170170
cfg-if = "1"
171171
env_logger = "0.10"
172+
glam = "0.24.2" # for ray-traced-triangle example
172173
winit = { version = "0.29.4", features = [
173174
"android-native-activity",
174175
] } # for "halmark" example

wgpu-hal/examples/halmark/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ impl<A: hal::Api> Example<A> {
442442
buffers: &[global_buffer_binding],
443443
samplers: &[&sampler],
444444
textures: &[texture_binding],
445+
acceleration_structures: &[],
445446
entries: &[
446447
hal::BindGroupEntry {
447448
binding: 0,
@@ -475,6 +476,7 @@ impl<A: hal::Api> Example<A> {
475476
buffers: &[local_buffer_binding],
476477
samplers: &[],
477478
textures: &[],
479+
acceleration_structures: &[],
478480
entries: &[hal::BindGroupEntry {
479481
binding: 0,
480482
resource_index: 0,

0 commit comments

Comments
 (0)