Commit f483d4ee by Jamie Madill Committed by Commit Bot

Vulkan: Move SwiftShader ICD json to root_out_dir.

This fixes loading SwiftShader in Chrome and in Renderdoc. Requires explicitly specifying the ICD and module directories ("./" or ".\\"). Bug: angleproject:3876 Bug: b/142756865 Change-Id: I9183c81cb0e8ac117fc5d7a8f2048dc0555632c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1864315Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 48aa52f7
......@@ -137,10 +137,15 @@ if (is_fuchsia) {
}
config("vulkan_config") {
_sws_icd = "./libvk_swiftshader_icd.json"
if (is_win) {
_sws_icd = ".\\\\libvk_swiftshader_icd.json"
}
defines = [
"ANGLE_VK_LAYERS_DIR=\"$angle_data_dir\"",
"ANGLE_VK_MOCK_ICD_JSON=\"$angle_data_dir/VkICD_mock_icd.json\"",
"ANGLE_VK_SWIFTSHADER_ICD_JSON=\"swiftshader/libvk_swiftshader_icd.json\"",
"ANGLE_VK_SWIFTSHADER_ICD_JSON=\"${_sws_icd}\"",
]
if (is_android) {
libs = [ "vulkan" ]
......@@ -175,20 +180,20 @@ if (angle_swiftshader) {
sources += [ "$root_gen_dir/angle/libvk_swiftshader_icd.json" ]
outputs = [
"$root_out_dir/swiftshader/libvk_swiftshader_icd.json",
"$root_out_dir/libvk_swiftshader_icd.json",
]
data = outputs
_raw_sws_in = rebase_path("$root_gen_dir/angle", root_build_dir)
_raw_sws_out = rebase_path("$root_out_dir/swiftshader", root_build_dir)
_raw_sws_out = rebase_path("$root_out_dir", root_build_dir)
_sws_output = ""
if (is_win) {
_sws_output += "vk_swiftshader.dll"
_sws_output += ".\\vk_swiftshader.dll"
} else if (is_mac) {
_sws_output += "libvk_swiftshader.dylib"
_sws_output += "./libvk_swiftshader.dylib"
} else {
_sws_output += "libvk_swiftshader.so"
_sws_output += "./libvk_swiftshader.so"
}
args = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment