mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-18 18:19:12 +00:00
Add support for vulkan layer suffixes
While Renderdoc already supported multiarch for where to install the libraries with the LIB_SUFFIX option. The Vulkan layer was left out of this loop. Vulkan layers living in `/usr/share/vulkan/implicit_layer.d/` will use a suffix before the `.json` to separate libraries of different architectures. These layer files will then point to the architecture specific `library_path` inside that json file. Also updates the check in `LayerRegistrationPath` so it handles the suffix as well. This way `renderdoccmd` won't complain about conflicting json files.
This commit is contained in:
1 parent
fca14eac32
commit
fb91e7360a
3 files changed
+14
-5
No files matched your search
@@ -125,7 +125,7 @@ elseif(UNIX)
|
||||
set(VULKAN_ENABLE_VAR "ENABLE_VULKAN_RENDERDOC_CAPTURE")
|
||||
|
||||
set(json_in ${CMAKE_CURRENT_SOURCE_DIR}/renderdoc.json)
|
||||
set(json_out ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/renderdoc_capture.json)
|
||||
set(json_out ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/renderdoc_capture${VULKAN_JSON_SUFFIX}.json)
|
||||
|
||||
configure_file(${json_in} ${json_out})
|
||||
|
||||
|
||||
@@ -365,17 +365,23 @@ rdcstr LayerRegistrationPath(LayerPath path)
|
||||
{
|
||||
switch(path)
|
||||
{
|
||||
case LayerPath::usr: return "/usr/share/vulkan/implicit_layer.d/renderdoc_capture.json";
|
||||
case LayerPath::etc: return "/etc/vulkan/implicit_layer.d/renderdoc_capture.json";
|
||||
case LayerPath::usr:
|
||||
return "/usr/share/vulkan/implicit_layer.d/renderdoc_capture" STRINGIZE(
|
||||
RENDERDOC_VULKAN_JSON_SUFFIX) ".json";
|
||||
case LayerPath::etc:
|
||||
return "/etc/vulkan/implicit_layer.d/renderdoc_capture" STRINGIZE(
|
||||
RENDERDOC_VULKAN_JSON_SUFFIX) ".json";
|
||||
case LayerPath::home:
|
||||
{
|
||||
const char *xdg = getenv("XDG_DATA_HOME");
|
||||
if(xdg && FileIO::exists(xdg))
|
||||
return rdcstr(xdg) + "/vulkan/implicit_layer.d/renderdoc_capture.json";
|
||||
return rdcstr(xdg) + "/vulkan/implicit_layer.d/renderdoc_capture" STRINGIZE(
|
||||
RENDERDOC_VULKAN_JSON_SUFFIX) ".json";
|
||||
|
||||
const char *home_path = getenv("HOME");
|
||||
return rdcstr(home_path != NULL ? home_path : "") +
|
||||
"/.local/share/vulkan/implicit_layer.d/renderdoc_capture.json";
|
||||
"/.local/share/vulkan/implicit_layer.d/renderdoc_capture" STRINGIZE(
|
||||
RENDERDOC_VULKAN_JSON_SUFFIX) ".json";
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user