nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.34k stars 142 forks source link

vk_raytracing_tutorial_KHR/docs/setup.md has wrong directory structure #25

Closed toomuchvoltage closed 3 years ago

toomuchvoltage commented 3 years ago

Perhaps at some point shared_external and shared_sources were expected to be outside of vk_raytracing_tutorial_KHR but that is no longer the case.

They should be inside vk_raytracing_tutorial_KHR as cmake will otherwise fail.

Also cmake mandates that the arch be specified as 64-bit explicitly (i.e. cmake -G "Visual Studio 15 2017 Win64" in vk_raytracing_tutorial_KHR). Otherwise, it will fail.

I'm just asking that the documents be updated to reflect this as I had to go through all of this in order to produce the project files.

Thanks!

richardeakin commented 3 years ago

FWIW all tutorials I've tried so far build out of the box for me (Windows 10, VS 2019 latest). I just do:

cd {sample dir}
mkdir build && cd build
cmake ..

And then open the .sln that was created in Visual Studio.

shared_external and shared_sources are still supposed to live beside all samples, AFAIK.

toomuchvoltage commented 3 years ago

Maybe that's the issue? I'm currently on VS 2017 (not migrating to VS 2019 yet).

shared_external and shared_sources are still supposed to live beside all samples, AFAIK.

Yea that's exactly what I'm experiencing, the samples being inside vk_raytracing_tutorial_KHR rather than outside. And shared_sources and shared_external having to be next to them.

mklefrancois commented 3 years ago

Thank you for reporting the issue, I will look at it. I think the problem might have been more related to win32 vs 64 bit. By default, newer versions of Visual Studio are using 64 bit and I will add this information to the next update.

Regarding the shared directories, their position can be outside or within the tutorial. This was made such that other nvpro-samples could work without having to download the shared folders multiple time. The CMake is searching for the shared_sources directory to various relative position from the current tutorial directory. Normally, it should have found it.

find_path(BASE_DIRECTORY2
    NAMES shared_sources
    PATHS  ${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}
    REQUIRED
    DOC "Couldn't find shared_source directory'"
    )

I major update is coming soon. If you have a repro case where this isn't working, please give as mush detail to be able to repro it.

Thanks

toomuchvoltage commented 3 years ago

Sure thing, I'll wait for the update and retry.

mklefrancois commented 3 years ago

The update have just happened. If you have further issues, please reopen it. Thanks