Confusing Acceleration Structure Buffer Offsets for VK_KHR_ray_tracing

In the Acceleration Structure View the information about the Vertex and Index Buffer Offsets seem to be messed up when using the VK_KHR_ray_tracing extension. For the Index Buffer it always shows me “@ 0B” after the Buffer Handle and the Vertex Buffer Offset seems to be calculated as firstVertex * vertexStride+primitiveOffset. According to the Vulkan Spec, these Values should be primitiveOffset for the Index Buffer and firstVertex * vertexStride for the Vertex Buffer, as far as I understand:

Am I misunderstanding something here? The Vulkan application seems to use the correct values. At least for only one BLAS it works correctly with all values I tried. If I use more BLAS, only one of them is shown.

1 Like

Thanks for your question on Nsight Graphics. I’m sorry you ran into this issue. I have created a bug for your issue. Is it possible for you to provide a reproducible for this issue with the latest Nsight Graphics 2020.4 release?

thank you very much for investigating this. What exactly should I provide? My whole application code + used libraries (including VS solution)? Only the .exe?
This is a research project for my masters thesis, but the results are eventually going to be used in software of the company I’m working at, so I can’t yet guarantee, that I’m allowed to provide this for you. I’m also not sure, if this problem still exists, because I found a workaround for the bug in my application which I tried to find with Nsight, so now my application also works for multiple BLAS.
I also changed the Vulkan SDK version I use and I can imagine, that the bug did not come from Nsight, but from Vulkan, because the mentioned workaround is actually just a different way to generate the same number and constellation of Acceleration Structures, according to the spec. As the results were different, there may have been a bug in the API.

I’ll try to give you some more Information soon.

Anyways: Nsight is a great Software, it helped me a lot, tell this your developers :)

the error still exists for 2020.4. Additionally (I didn’t write this last time, but I already had that problem there), the acceleration structure visualization is messed up. In most cases I can’t see anything and sometimes it shows the right vertices, but randomly connected. If there is to many data in the structures, Nsight crashes immediately after loading the AS.
If you tell me what exactly to provide as reproducible and how, I can try.

Thanks for the additional info when using Nsight 2020.4. Let me get back to you on what to provide for the repro.

This issue should now be resolved in our latest release, Nsight Graphics 2020.6.0. Please try with our latest release and let me know your experience.

as my application was developed with the provisional VK_KHR_ray_tracing extension, I won’t be able to test it with Nsight 2020.6.0. If I decide to update the application, I’ll let you know if it works, but I can’t guarantee, that this will happen.

Hello again,
by now, I ported the application to the new extensions and I can see all BLASes in the AS viewer now and they’re all displayed correctly. But now I dont understand, what Nsight tells me about the index and vertex buffers. I will look into it again, but I don’t know when.