Comments (11)
There seems to be some issue with path for 'glslangValidator', I think I didn't set it properly.
so I changed to glslc
COMMAND ${Vulkan_GLSLC_EXECUTABLE} --target-env=vulkan1.2 -o
It generated shaders successfully, Thanks!
from vulkan_ray_tracing_minimal_abstraction.
Perfect! Glad to hear it's working now! π
from vulkan_ray_tracing_minimal_abstraction.
Oh, I think this might be an issue where the application can't find the shader files but it does seem like you are running ./application
inside the build directory.
Could you check to see if the shader files are present in your build directory (after compiling)?
This is what my build directory looks like after compilation:
build/
βββ application
βββ CMakeCache.txt
βββ CMakeFiles
βΒ Β βββ 3.23.1
βΒ Β βΒ Β βββ CMakeCCompiler.cmake
βΒ Β βΒ Β βββ CMakeCXXCompiler.cmake
βΒ Β βΒ Β βββ CMakeDetermineCompilerABI_C.bin
βΒ Β βΒ Β βββ CMakeDetermineCompilerABI_CXX.bin
βΒ Β βΒ Β βββ CMakeSystem.cmake
βΒ Β βΒ Β βββ CompilerIdC
βΒ Β βΒ Β βΒ Β βββ a.out
βΒ Β βΒ Β βΒ Β βββ CMakeCCompilerId.c
βΒ Β βΒ Β βΒ Β βββ tmp
βΒ Β βΒ Β βββ CompilerIdCXX
βΒ Β βΒ Β βββ a.out
βΒ Β βΒ Β βββ CMakeCXXCompilerId.cpp
βΒ Β βΒ Β βββ tmp
βΒ Β βββ 3.23.2
βΒ Β βΒ Β βββ CMakeCCompiler.cmake
βΒ Β βΒ Β βββ CMakeCXXCompiler.cmake
βΒ Β βΒ Β βββ CMakeDetermineCompilerABI_C.bin
βΒ Β βΒ Β βββ CMakeDetermineCompilerABI_CXX.bin
βΒ Β βΒ Β βββ CMakeSystem.cmake
βΒ Β βΒ Β βββ CompilerIdC
βΒ Β βΒ Β βΒ Β βββ a.out
βΒ Β βΒ Β βΒ Β βββ CMakeCCompilerId.c
βΒ Β βΒ Β βΒ Β βββ tmp
βΒ Β βΒ Β βββ CompilerIdCXX
βΒ Β βΒ Β βββ a.out
βΒ Β βΒ Β βββ CMakeCXXCompilerId.cpp
βΒ Β βΒ Β βββ tmp
βΒ Β βββ application.dir
βΒ Β βΒ Β βββ build.make
βΒ Β βΒ Β βββ cmake_clean.cmake
βΒ Β βΒ Β βββ compiler_depend.internal
βΒ Β βΒ Β βββ compiler_depend.make
βΒ Β βΒ Β βββ compiler_depend.ts
βΒ Β βΒ Β βββ DependInfo.cmake
βΒ Β βΒ Β βββ depend.make
βΒ Β βΒ Β βββ flags.make
βΒ Β βΒ Β βββ link.txt
βΒ Β βΒ Β βββ progress.make
βΒ Β βΒ Β βββ src
βΒ Β βΒ Β βββ main.cpp.o
βΒ Β βΒ Β βββ main.cpp.o.d
βΒ Β βββ cmake.check_cache
βΒ Β βββ CMakeDirectoryInformation.cmake
βΒ Β βββ CMakeOutput.log
βΒ Β βββ CMakeRuleHashes.txt
βΒ Β βββ CMakeTmp
βΒ Β βββ copy_resources.dir
βΒ Β βΒ Β βββ build.make
βΒ Β βΒ Β βββ cmake_clean.cmake
βΒ Β βΒ Β βββ compiler_depend.make
βΒ Β βΒ Β βββ compiler_depend.ts
βΒ Β βΒ Β βββ DependInfo.cmake
βΒ Β βΒ Β βββ progress.make
βΒ Β βββ Makefile2
βΒ Β βββ Makefile.cmake
βΒ Β βββ progress.marks
βΒ Β βββ TargetDirectories.txt
βββ cmake_install.cmake
βββ Makefile
βββ resources
βΒ Β βββ cube_scene.mtl
βΒ Β βββ cube_scene.obj
βββ shaders
βββ shader.rchit.spv
βββ shader.rgen.spv
βββ shader.rmiss.spv
βββ shader_shadow.rmiss.spv
from vulkan_ray_tracing_minimal_abstraction.
Hi William as you mentioned, ran the ./application in the build directory but could not find the shaders in the shaders/ folder.
from vulkan_ray_tracing_minimal_abstraction.
It seems like there might be an issue when trying to compile the shaders. Here is what my output looks like when building the project:
[wlew@archlinux:/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build]$ cmake ..
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: /storage/projects/vulkan_research_kit/tools/vulkan_development/install/lib/libvulkan.so (found version "1.3.204")
-- Configuring done
-- Generating done
-- Build files have been written to: /storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build
[wlew@archlinux:/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build]$ make
[ 0%] Built target copy_resources
[ 16%] Generating shaders/shader_shadow.rmiss.spv
/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/src/shader_shadow.rmiss
[ 33%] Generating shaders/shader.rchit.spv
/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/src/shader.rchit
[ 50%] Generating shaders/shader.rgen.spv
/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/src/shader.rgen
[ 66%] Generating shaders/shader.rmiss.spv
/storage/projects/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/src/shader.rmiss
[ 83%] Building CXX object CMakeFiles/application.dir/src/main.cpp.o
[100%] Linking CXX executable application
[100%] Built target application
Since the shaders are missing from your build, I'm assuming that it doesn't show the Generating shaders/______.spv
output when building.
Could you check to see if you have the glslangValidator
program?
from vulkan_ray_tracing_minimal_abstraction.
glslangValidator is present! in /usr/bin/glslangValidator
:~/Desktop/sample/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build$ make
[ 0%] Built target copy_resources
[ 16%] Generating shaders/shader_shadow.rmiss.spv
make[2]: target-env: Command not found
[ 33%] Generating shaders/shader.rchit.spv
make[2]: target-env: Command not found
[ 50%] Generating shaders/shader.rgen.spv
make[2]: target-env: Command not found
[ 66%] Generating shaders/shader.rmiss.spv
make[2]: target-env: Command not found
[ 83%] Building CXX object CMakeFiles/application.dir/src/main.cpp.o
[100%] Linking CXX executable application
[100%] Built target application
from vulkan_ray_tracing_minimal_abstraction.
It seems like the cmake find_package(Vulkan REQUIRED)
isn't properly setting the Vulkan_GLSLANG_VALIDATOR_EXECUTABLE
variable properly.
vulkan_ray_tracing_minimal_abstraction/ray_pipeline/CMakeLists.txt
Lines 27 to 28 in 24d1497
For now, a temporary solution is to change ${Vulkan_GLSLANG_VALIDATOR_EXECUTABLE}
to glslangValidator so that the shaders can compile using the program.
I'm going to update the cmake_minimum_required version to 3.21 to ensure the Vulkan::glslangValidator target is imported.
https://cmake.org/cmake/help/latest/module/FindVulkan.html
from vulkan_ray_tracing_minimal_abstraction.
When I'm running the ./application. It is showing a blank screen "Vulkan not Responding" as popup and force quitting the application.
This is the console output
Validation Information: [ UNASSIGNED-khronos-validation-createinstance-status-message ] Object 0: handle = 0x1034650, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd7fa5f44 | Khronos Validation Layer Active:
Β Β Β Settings File: None. Default location is /home/sample/vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build\vk_layer_settings.txt.
Β Β Β Current Enables: VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION.
Β Β Β Current Disables: None.
NVIDIA GeForce RTX 2080
killed
FYI
> ~ vulkaninfo | grep KHR_ray
WARNING: [Loader Message] Code 0 : verify_meta_layer_component_layers: Meta-layer uses API version 1.2, but component layer 0 uses API version 1.3.Β Skipping this layer.
ERROR: [Loader Message] Code 0 : libVkLayer_MESA_device_select.so: cannot open shared object file: No such file or directory
VK_KHR_ray_queryΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β : extension revision 1
VK_KHR_ray_tracing_pipelineΒ Β Β Β Β Β Β Β Β Β Β Β Β Β : extension revision 1
I'm in a doubt that, is it causing error because of Vulkan 1.3 version?
from vulkan_ray_tracing_minimal_abstraction.
Hmm I don't think the 1.3 should be an issue.
I think it might be hanging on the main loop. If possible could you write a print statement right before the main loop here:
vulkan_ray_tracing_minimal_abstraction/ray_pipeline/src/main.cpp
Lines 2681 to 2683 in 9660901
My guess is there might be a bug with the semaphores/fences when trying to acquire a new image.
from vulkan_ray_tracing_minimal_abstraction.
Hi @WilliamLewww
Thanks for your patience
I added this print statement in main.cpp:
std::cout << "Debugging: Could not find Vulkan" << std::endl;
Output: Same as I got earlier: Vulkan not responding and I had to force quit the application
> vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build$ ./application
Validation Information: [ UNASSIGNED-khronos-validation-createinstance-status-message ] Object 0: handle = 0x5a1820, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd7fa5f44 | Khronos Validation Layer Active:
Β Β Β Settings File: None. Default location is /vulkan_ray_tracing_minimal_abstraction/ray_pipeline/build\vk_layer_settings.txt.
Β Β Β Current Enables: VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION.
Β Β Β Current Disables: None.
NVIDIA GeForce RTX 2080
Killed
from vulkan_ray_tracing_minimal_abstraction.
Sorry for the late response, my notifications seem to not be working at the moment.
Hmmm it seems like it's hanging on a specific stage. To try to debug it, you could probably add a print statement at the start of each section.
In this case, it might be useful in general to have a printout for every section so I'll try to open a pull request with the print statements.
from vulkan_ray_tracing_minimal_abstraction.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulkan_ray_tracing_minimal_abstraction.