mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-03 11:21:03 +02:00
Add icd.d JSON files for local, non-bundled builds
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"file_format_version" : "1.0.0",
|
||||||
|
"ICD": {
|
||||||
|
"library_path": "../../libMoltenVK.dylib",
|
||||||
|
"api_version" : "1.4.0",
|
||||||
|
"is_portability_driver" : true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ICD": {
|
||||||
|
"api_version": "1.3.0",
|
||||||
|
"library_path": "../../libvulkan_kosmickrisp.dylib"
|
||||||
|
},
|
||||||
|
"file_format_version": "1.0.1"
|
||||||
|
}
|
||||||
@@ -10,9 +10,19 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
private static string GetIcdPath(string fileName)
|
private static string GetIcdPath(string fileName)
|
||||||
{
|
{
|
||||||
string contentsDir = Path.GetDirectoryName(AppContext.BaseDirectory.TrimEnd('/'))!;
|
string contentsDir = Path.GetDirectoryName(AppContext.BaseDirectory.TrimEnd('/'))!;
|
||||||
string icdPath = Path.Combine(contentsDir, "Resources", "vulkan", "icd.d", fileName);
|
string[] searchPaths =
|
||||||
|
[
|
||||||
|
Path.Combine(contentsDir, "Resources", "vulkan", "icd.d", fileName),
|
||||||
|
Path.Combine(contentsDir, "vulkan", "icd.d", fileName)
|
||||||
|
];
|
||||||
|
|
||||||
return !File.Exists(icdPath) ? throw new FileNotFoundException($"{fileName} not found", icdPath) : icdPath;
|
foreach (string icdPath in searchPaths)
|
||||||
|
{
|
||||||
|
if (File.Exists(icdPath))
|
||||||
|
return icdPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new FileNotFoundException($"{fileName} not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void MoltenVK()
|
public static void MoltenVK()
|
||||||
|
|||||||
@@ -90,6 +90,18 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-arm64' OR '$(RuntimeIdentifier)' == 'osx-x64'">
|
||||||
|
<Content Include="..\..\distribution\macos\vulkan\icd.d\MoltenVK_icd-flat.json"
|
||||||
|
CopyToOutputDirectory="PreserveNewest"
|
||||||
|
Link="vulkan\icd.d\MoltenVK_icd.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-arm64'">
|
||||||
|
<Content Include="..\..\distribution\macos\vulkan\icd.d\libkosmickrisp_icd-flat.json"
|
||||||
|
CopyToOutputDirectory="PreserveNewest"
|
||||||
|
Link="vulkan\icd.d\libkosmickrisp_icd.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64' OR '$(RuntimeIdentifier)' == 'linux-arm64'" >
|
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64' OR '$(RuntimeIdentifier)' == 'linux-arm64'" >
|
||||||
<Content Include="..\..\distribution\linux\Ryujinx.sh">
|
<Content Include="..\..\distribution\linux\Ryujinx.sh">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
|||||||
Reference in New Issue
Block a user