-
Notifications
You must be signed in to change notification settings - Fork 938
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
Ray tracing compaction #6609
base: trunk
Are you sure you want to change the base?
Ray tracing compaction #6609
Conversation
…mpaction # Conflicts: # wgpu-core/src/resource.rs
# Conflicts: # .gitattributes # wgpu-core/src/command/compute.rs # wgpu-core/src/command/render.rs # wgpu-core/src/device/life.rs # wgpu-core/src/device/resource.rs # wgpu-core/src/track/mod.rs
# Conflicts: # examples/src/ray_cube_compute/mod.rs # wgpu-core/src/command/ray_tracing.rs # wgpu-core/src/device/ray_tracing.rs # wgpu-core/src/resource.rs # wgpu-hal/src/dx12/command.rs # wgpu-hal/src/dx12/device.rs # wgpu-hal/src/metal/command.rs # wgpu-hal/src/vulkan/command.rs # wgpu/src/context.rs # wgpu/src/ray_tracing.rs
…cing-compaction # Conflicts: # examples/src/ray_cube_compute/mod.rs # player/src/lib.rs # wgpu-core/src/command/ray_tracing.rs # wgpu-core/src/device/ray_tracing.rs # wgpu-core/src/device/resource.rs # wgpu-core/src/device/trace.rs # wgpu-core/src/lock/rank.rs # wgpu-core/src/ray_tracing.rs # wgpu-core/src/resource.rs # wgpu-core/src/scratch.rs # wgpu-hal/src/empty.rs # wgpu-types/src/lib.rs # wgpu/src/api/command_encoder.rs # wgpu/src/backend/webgpu.rs # wgpu/src/backend/wgpu_core.rs # wgpu/src/context.rs
…ERATION_STRUCTURE_QUERY.
The synchronization around I don't understand the big picture here, but I think these things need to either use the trackers, or there needs to be a Mutex somewhere. |
Now that I think about it, I'm not sure that a mutex would be sufficient. I think that the synchronization may need to be redone. Here are the requirements I have thought up that should be implemented:
I'll get started on this. |
The synchronisation between threads should now be improved, and I think this should be synchronised correctly. |
Nvidia has this neat diagram showing the state machine of the compaction process https://developer.nvidia.com/blog/tips-acceleration-structure-compaction/#how_does_compaction_work |
…-tracing-compaction
…cing-compaction # Conflicts: # CHANGELOG.md # tests/tests/ray_tracing/as_build.rs # wgpu-core/src/device/queue.rs
Connections
Follow up to #6291
Description
Adds the function
compact_blas
as specified in #1040. This needed two more functions in wgpu-hal. These are based on DX12 and the function callEmitRaytracingAccelerationStructurePostbuildInfo()
. On Vulkan this call is emulated with query sets. Compaction does not need any additional featues. Depending on the GPU and BLAS contents compaction may not be possible. In that case the BLAS will be duplicated (logic done by GPU driver).This change is shown by ray_cube_compute, which now compacts the BLAS before using it. This shows the requirements of the function.
Testing
Adds two more tests, testing valid and invalid compaction operations.
Checklist
cargo fmt
.taplo format
. - done by CIcargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.