Daemon-vulkan infrastructure 2#1845
Conversation
|
Most of the changes are just the XML spec and existing generator code. |
afbdcb0 to
f8462a8
Compare
f8462a8 to
72c00bf
Compare
slipher
left a comment
There was a problem hiding this comment.
VulkanHeaders seems to be a third-party library, so it should go in libs. Is there some good reason to check in the files directly instead of using a submodule?
72c00bf to
4d9ae49
Compare
Most of it is not used by daemon-vulkan. |
|
So what is the future maintenance plan for VulkanHeaders: do we expect to maintain it ourselves or periodically sync updates from upstream? |
Periodic sync. Header generator rarely ever gets updates and likely would continue working as is without issue. |
2cdc4da to
2ce79c6
Compare
|
OK cool. In any case it should go in |
2ce79c6 to
64f9b54
Compare
|
Moved it. |
slipher
left a comment
There was a problem hiding this comment.
slightly modified version of the Khronos Vulkan header generator,
If there are modifications of the files in libs/ relative to upstream, would you mind checking in the original upstream version as the first commit, and then the local changes as a second commit? That way we can see what was changed in the history.
Also I request that the commit hash of the Vulkan Headers repo be recorded in the commit message.
cmake/DaemonVulkan.cmake
Outdated
| message( FATAL_ERROR "Could NOT find libVulkan" ) | ||
| endif() | ||
|
|
||
| set( generatorPath ${CMAKE_SOURCE_DIR}/cmake/DaemonVulkan/VulkanHeaders/ ) |
cmake/DaemonVulkan.cmake
Outdated
| endif() | ||
| endfunction() | ||
|
|
||
| function( GenerateVulkanHeaders2 ) |
There was a problem hiding this comment.
Why do we need GenerateVulkanHeaders and GenerateVulkanHeaders2?
There was a problem hiding this comment.
Just unsuccessful attempts at making cmake generate it automatically. I've removed that, easier to just run the generator script manually and commit the headers than deal with cmake's bullshit.
cmake/DaemonVulkan.cmake
Outdated
| find_package( Vulkan REQUIRED COMPONENTS glslangValidator glslang ) | ||
|
|
||
| if( NOT Vulkan_FOUND ) | ||
| message( FATAL_ERROR "Could NOT find libVulkan" ) |
There was a problem hiding this comment.
This shouldn't be needed since REQUIRED was used
There was a problem hiding this comment.
I've removed that find_package since it's not used anymore.
cmake/DaemonVulkan.cmake
Outdated
| endforeach() | ||
|
|
||
| if( REGENERATE OR ${generatorPath}/vk.xml IS_NEWER_THAN ${generatorPath}/vk.xml.tmp OR NOT EXISTS ${generatorPath}/vk.xml.tmp ) | ||
| configure_file( ${generatorPath}/vk.xml ${generatorPath}/vk.xml.tmp COPYONLY ) |
There was a problem hiding this comment.
Why do we need to make an exact copy of the XML file?
There was a problem hiding this comment.
Just more attempts at making it generate, removed now.
|
|
||
| macro( GenerateVulkanShaders target ) | ||
| # Pre-processing for #insert/#include | ||
| foreach( src IN LISTS graphicsEngineList ) |
There was a problem hiding this comment.
Where is graphicsEngineList defined?
There was a problem hiding this comment.
In renderer-vulkan/src.cmake, but there's nothing to check in there currently. I have a couple files there that I've been testing with locally, but they're just random code from the GL renderer with a few changes.
| option( VULKAN_SPIRV_LTO "Enable link-time SPIR-V optimisations." ON ) | ||
|
|
||
| if( USE_VULKAN ) | ||
| add_executable( VulkanShaderParser "${DAEMON_DIR}/cmake/DaemonVulkan/VulkanShaderParser.cpp" ) |
There was a problem hiding this comment.
Host-mode tools mess up cross compiling, so it would be nice to rewrite that in Python at some point (non-blocking comment)
There was a problem hiding this comment.
Yeah probably. This is mostly just the #insert code from gl_shader.cpp, with support for recursion and glslangValidator calls.
6a64000 to
21f9e08
Compare
Sure, done. |
…s to regenerate the target
21f9e08 to
1fd0e0b
Compare
f81e205 to
984d775
Compare
Vulkan header generator and xml spec from https://github.com/KhronosGroup/Vulkan-Docs commit: 7fe2b623f13dabb885e35b953dd690f01093d4bb
984d775 to
cdfea57
Compare
Also add a script to generate all the headers we need along with function loading.
cdfea57 to
f10467d
Compare
Adds some more cmake changes required for daemon-vulkan, slightly modified version of the Khronos Vulkan header generator, as well as a shader generator with support for
#insert/#includeand SPIR-V generation. Also added some of the embed stuff from #1842 with more functionality.