mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-04 13:04:21 +00:00
Add command to renderdoccmd that will handle vulkan layer registration
* This is similar to the button on the capture dialog of the windows UI, except on linux the situation is a bit more complex as layers can be registered in two different system locations (one for distro packages and one for non-distro stuff), as well as in $HOME. * On linux we make sure the json always contains an absolute path so we can tell from any given build whether or not a json is our own or not. * By default we now install the json to /etc since /usr is reserved for proper distro packages, and shouldn't be written to by 'make install'. There's a CMake variable for overriding this for anyone who wants to make install into a custom folder (maybe for packaging).
This commit is contained in:
1 parent
3693a17c73
commit
d3e4790ee8
3 files changed
+487
-3
No files matched your search
@@ -228,7 +228,8 @@ set(data
|
||||
data/glsl/text.vert
|
||||
data/glsl/array2ms.comp
|
||||
data/glsl/ms2array.comp
|
||||
data/sourcecodepro.ttf)
|
||||
data/sourcecodepro.ttf
|
||||
driver/vulkan/renderdoc.json)
|
||||
|
||||
set(data_objects)
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ set(sources
|
||||
|
||||
set(definitions ${RDOC_DEFINITIONS})
|
||||
|
||||
# This must be specified separately because it needs to go in /etc regardless of what the install
|
||||
# prefix is, since the loader only looks in a set location (and /usr/share is reserved for distribution
|
||||
# packages). For people who want to 'make install' to another folder, perhaps for preparing a package,
|
||||
# they can set this variable to make sure it stays local
|
||||
set(VULKAN_LAYER_FOLDER /etc/vulkan/implicit_layer.d CACHE PATH "Path to install the vulkan layer file")
|
||||
|
||||
if(ANDROID)
|
||||
list(APPEND sources vk_posix.cpp vk_android.cpp vk_tracelayer_android.cpp)
|
||||
list(APPEND definitions PRIVATE -DVK_USE_PLATFORM_ANDROID_KHR)
|
||||
@@ -57,11 +63,11 @@ elseif(UNIX)
|
||||
set(json_in ${CMAKE_CURRENT_SOURCE_DIR}/renderdoc.json)
|
||||
set(json_out ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/renderdoc_capture.json)
|
||||
add_custom_command(OUTPUT ${json_out}
|
||||
COMMAND sed '{s%...renderdoc.dll%librenderdoc.so%}' < ${json_in} > ${json_out}
|
||||
COMMAND sed '{s%...renderdoc.dll%${CMAKE_INSTALL_PREFIX}/lib/librenderdoc.so%}' < ${json_in} > ${json_out}
|
||||
DEPENDS ${json_in})
|
||||
add_custom_target(generate-json ALL DEPENDS ${json_out})
|
||||
|
||||
install (FILES ${json_out} DESTINATION share/vulkan/implicit_layer.d)
|
||||
install (FILES ${json_out} DESTINATION ${VULKAN_LAYER_FOLDER})
|
||||
endif()
|
||||
|
||||
# GCC 6.1 may or may not complain about enum reference casts
|
||||
|
||||
Reference in new issue
Block a user