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: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureBuildOffsetInfoKHR.html

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

Hello,
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?

Hi,
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 :)

Hi,
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.

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