[hal metal] ray tracing acceleration structures#8071
Conversation
e1218ce to
edeaaba
Compare
Vecvec
left a comment
There was a problem hiding this comment.
All of the migrated things look good, but I'm not sure the residency sets would work in complex scenarios. Please correct me if I've gotten anything wrong.
|
Open problems remaining:
|
1244389 to
aa6be88
Compare
|
@Lichtso I think that we think of |
|
Yes, supposedly In other words it should be fine to remove live resources from a residency set, as long as those are not committed until all pending command buffers that are still referencing these resources have finished. @Vecvec afaik the device space you have drawn isn't affected until a command buffer referencing a certain |
I don't think it was very clear that what is put in the residency set is not the same as what is made resident, I was meaning calling |
|
I recently also found out that residency set methods aren't thread safe, meaning that a mutex is needed around the residency set. |
|
@Lichtso, just following up on this. Do you have any updates? |
|
Haven't worked on this any further and objc2-metal is also not merged yet. |
|
@Lichtso I would recommend putting the residency set in the HAL command buffer, and having a function to add to it (and possibly this could also |
aa6be88 to
0231aa8
Compare
|
Seems the objc2-metal PR was merged, time to rebase this then. |
9bf31db to
5c62287
Compare
squash with "Implements resource binding."
5c62287 to
1a240b9
Compare
Vecvec
left a comment
There was a problem hiding this comment.
Looks good! I have a few comments, but nothing major.

Connections
Fixes: #7402
Depends on: #5641
Supersedes: #7660
Description
Implements the missing ray tracing acceleration structures in the HAL metal backend.
Testing
The examples
ray_scene,ray_shadows,ray_cube_compute,ray_cube_fragmentandray_traced_triangleall work.That is if invoked via
cargo run --bin wgpu-examples ray_traced_triangle, but not viacargo xtask test ray_traced_triangle, still current CI runner is too old to catch that as it does not support hardware ray tracing.Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests.cargo xtask testto run tests.CHANGELOG.mdentry.