Add an example for ray queries and acceleration structures#2314
Add an example for ray queries and acceleration structures#2314atynagano wants to merge 4 commits intovulkano-rs:masterfrom
Conversation
|
Are you still working on this? |
…uery-example # Conflicts: # examples/src/bin/ray-query.rs
|
I am not confident about the quality, but should I make it Ready for review? |
|
Could you please remove all the comments that aren't related to ray queries? For consitency with the other examples. Also, please run rustfmt on the code. |
|
At first glance it looks ok, but acceleration structures aren't supported on my device yet (still waiting on Mesa 23.2) so I can't test it. The code should not crash when it's not supported, so that's a TODO for this PR still. I notice that when you build an acceleration structure, you immediately submit a command buffer and then wait for it to finish. That doesn't seem very efficient. |
|
@Rua Thanks for your review.
I know, but BLAS, TLAS, and pipeline have dependencies, and at least these cannot be executed asynchronously. I have referred to the following implementation, where they are executed synchronously. https://github.com/KhronosGroup/Vulkan-Samples/blob/5e4e3d20b3a86f7814e026042341cf34ef530edd/framework/core/acceleration_structure.cpp#L218 |
|
But is it necessary to wait for the submission? That means the whole execution stalls until the fence is signalled. A semaphore, or just putting them all in the same command buffer, seems less extreme. |
|
I got it, but I don't know how to realize it in vulkano. |
Fixes #2308.
The code is mostly from triangle-v1_3 and lacks compatibility check, comments, and may contains irregular coding styles.