Module: Mesa
Branch: master
Commit: 7008e6558a8c96920b48ed7265a85bca07f469de
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7008e6558a8c96920b48ed7265a85bca07f469de

Author: James Park <[email protected]>
Date:   Sun Feb  7 18:38:58 2021 -0800

radv: Update JSON generator if Windows

Use vulkan_radeon.dll, and apply current working directory.

Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8911>

---

 src/amd/vulkan/meson.build | 10 +++++++++-
 src/amd/vulkan/radv_icd.py |  5 +++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 8d3646ad49c..9012d860db3 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -207,13 +207,21 @@ if with_symbols_check
   )
 endif
 
+icd_lib_path = join_paths(get_option('prefix'), get_option('libdir'))
+icd_file_name = 'libvulkan_radeon.so'
+if with_platform_windows
+  icd_lib_path = '.'
+  icd_file_name = 'vulkan_radeon.dll'
+endif
+
 radeon_icd = custom_target(
   'radeon_icd',
   input : 'radv_icd.py',
   output : 'radeon_icd.@[email protected]'.format(host_machine.cpu()),
   command : [
     prog_python, '@INPUT@',
-    '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
+    '--lib-path', icd_lib_path,
+    '--file-name', icd_file_name,
     '--out', '@OUTPUT@',
   ],
   depend_files : files('radv_extensions.py'),
diff --git a/src/amd/vulkan/radv_icd.py b/src/amd/vulkan/radv_icd.py
index cc86bbfa56c..ab1162a5076 100644
--- a/src/amd/vulkan/radv_icd.py
+++ b/src/amd/vulkan/radv_icd.py
@@ -28,10 +28,11 @@ from radv_extensions import *
 if __name__ == '__main__':
     parser = argparse.ArgumentParser()
     parser.add_argument('--out', help='Output json file.', required=True)
-    parser.add_argument('--lib-path', help='Path to libvulkan_radeon.so')
+    parser.add_argument('--lib-path', help='Path to file')
+    parser.add_argument('--file-name', help='Name of file')
     args = parser.parse_args()
 
-    path = 'libvulkan_radeon.so'
+    path = args.file_name
     if args.lib_path:
         path = os.path.join(args.lib_path, path)
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to