nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.36k stars 143 forks source link

vkGetBufferDeviceAddress could not be located #6

Closed sidshekar closed 4 years ago

sidshekar commented 4 years ago

Hi,

I am able to create the project but when I run any of the samples I get this error.

I am not sure what is causing it.

image

Kindly help. thanks,

NBickford-NV commented 4 years ago

Hi sidshekar,

My first guess is that this might point to Vulkan being linked into the application incorrectly - could you let me know which version of the Vulkan API you're using, as well as if CMake printed out any error or warning messages during configuration?

Thanks!

sidshekar commented 4 years ago

Hi, the vulkan version being used is 1.2.135.0. No CMAKE didnt give an error/warninhg during configuration.

image

NBickford-NV commented 4 years ago

Hmm - looks like I can repro the problem here as well! Oddly enough, it looks like vkGetBufferDeviceAddress is the only symbol it can't find in C:\Windows\system32\vulkan-1.dll, which is very odd.

sidshekar commented 4 years ago

Yes that is strange indeed. Should I use a previous version of SDK then?

NBickford-NV commented 4 years ago

I don't think so - vk_device_generated_cmds uses vkGetBufferDeviceAddressEXT (which it manually loads), so it's probably an issue with the sample itself or the Vulkan headers. Tagging in @mklefrancois to see if he can take a look at it next week in case I can't figure it out today!

NBickford-NV commented 4 years ago

OK, I'm still not totally sure why this is the case and am unfortunately out of time for the week, but it looks like the application should load if you replace all instances of vkGetBufferDeviceAddress with vkGetBufferDeviceAddressKHR in raytraceKHR_vk.cpp and then do a clean rebuild!

sidshekar commented 4 years ago

Ok thanks! Ill try.

sidshekar commented 4 years ago

After replacing vkGetBufferDeviceAddress with vkGetBufferDeviceAddressKHR in raytraceKHR_vk.hpp now I get a runtime error.

image

Says compatible devices 0. I am running a RTX 2080.

image

image

NBickford-NV commented 4 years ago

That's interesting - maybe try using the non-KHR vk_raytracing_tutorial while we work this out?

Thanks again!

sidshekar commented 4 years ago

Thanks. I tried that one as well. It has an issue with creating Shader Binding Table!!.

image

The before project works in both solutions. It is in the ray tracing samples that all fail.

image

mklefrancois commented 4 years ago

Hi,

I just have tried and I don't see the issue you are mentioning in the KHR tutorial. Please make sure to install the latest Vulkan 1.2 BETA driver (443.24). https://developer.nvidia.com/vulkan-driver

Regarding the other issue you are seeing with the NV tutorial, the problem resides in the vulkan.hpp. The screenshot shows that the function getRayTracingShaderGroupHandlesNV calls getRayTracingShaderGroupHandlesKHR and this one is NULL as it is not part of the extensions added on the creation of the device. To fix this, you can modify vulkan.hpp to call the NV version instead of the KHR. There are a few of those in the 1.2.135 version of the SDK, and is fixed on GitHub.

sidshekar commented 4 years ago

Ok. Thanks for letting me know. I’ll try installing the beta drivers.

On Sat, 30 May 2020 at 10:25 PM, Martin-Karl Lefrançois < notifications@github.com> wrote:

Hi,

I just have tried and I don't see the issue you are mentioning in the KHR tutorial. Please make sure to install the latest Vulkan 1.2 BETA driver (443.24). https://developer.nvidia.com/vulkan-driver

Regarding the other issue you are seeing with the NV tutorial, the problem resides in the vulkan.hpp. The screenshot shows that the function getRayTracingShaderGroupHandlesNV calls getRayTracingShaderGroupHandlesKHR and this one is NULL as it is not part of the extensions added on the creation of the device. To fix this, you can modify vulkan.hpp to call the NV version instead of the KHR. There are a few of those in the 1.2.135 version of the SDK, and is fixed on GitHub.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/issues/6#issuecomment-636310958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV2YENDNXI7GS32J63AIE3RUDNKZANCNFSM4NONZCGA .

mklefrancois commented 4 years ago

Please let me know if the KHR version works for you. It is the newest version of the tutorial and contains the latest fixes. Note that the non-beta driver doesn't have all symbols, this might be why it was not working for you.

sidshekar commented 4 years ago

Hi! Ya the KHR samples work after installing the beta drivers. I wasnt sure if the beta drivers were still required as it is say anywhere on the tutorial. thanks!!