-
Notifications
You must be signed in to change notification settings - Fork 898
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 Queries #6291
base: trunk
Are you sure you want to change the base?
Ray Queries #6291
Conversation
…leration-structures
…ing + hub clear fix (added tlas instance buffer)
…leration-structures
…nsafe_tlas` and `command_encoder_build_acceleration_structures` are currently separate
@cwfitzgerald I've been thinking about the issue you are having with llvmpipe, it seems to be that the scratch buffer's device address is not properly aligned, that sounds to me like it's a wgpu-hal issue not a wgpu-core issue. To help check whether it is as I think, could you try the hal ray-traced-triangle? edit: comment is
|
Good idea - I can also debug this a bit to see what's going on. |
Hmm... this line ( wgpu/wgpu-hal/src/vulkan/device.rs Lines 918 to 925 in 859dd88
let alignment_mask = if desc.usage.intersects(
crate::BufferUses::TOP_LEVEL_ACCELERATION_STRUCTURE_INPUT
| crate::BufferUses::BOTTOM_LEVEL_ACCELERATION_STRUCTURE_INPUT,
) {
16
} else if desc.usage.contains(crate::BufferUses::ACCELERATION_STRUCTURE_SCRATCH) {
128
} else {
req.alignment
} - 1; |
I'm fairly certain that this is actually a lavapipe bug. Even if we properly manage the alignment, the resulting buffer device address pointer is not actually aligned as much as the memory is. This seems to be technically allowed for the spec, but it's probably just a spec oversight. I'm going to put together a bug report tomorrow and file it against Mesa to see what they say. |
…uctures_unsafe_tlas`
that would explain why I couldn't repro this even though I have the same minAccelerationStructureScratchOffsetAlignment as mesa. |
Looking good - I'm going to do a documentation and formatting pass, then check in with the other maintainers tomorrow, but I'm expecting to get this in by the end of the week! |
Connections
Works towards #1040
Description
This PR provides BLASes (bottom level acceleration structures), TLASes (top level acceleration structures), TLAS instances (which contain BLASes and data, like transforms, about them), TLAS packages (which contain vectors of TLAS instances).
Testing
Running tests & examples included in PR
This a updated version of #3631 and is intended to replace it.
Checklist
cargo fmt
.cargo 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.Later (follow-up PR)
as_hal
methods