mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-05-22 13:32:05 +00:00
Vulkan Package Update - Part 1 (#16)
As described. Should hopefully bring speed-ups for macOS devices (thanks Ori!) and general improvements across the board for the vulkan backend (maybe). This will be followed up with a PR from @KeatonTheBot. Co-authored-by: V380-Ori <infiniteloop0finsanity@gmail.com> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/16
This commit is contained in:
parent
b7772462f1
commit
d94b759e89
6 changed files with 37 additions and 32 deletions
|
|
@ -45,7 +45,7 @@
|
||||||
<!--<PackageVersion Include="Ryujinx.Audio.OpenAL.Dependencies" Version="1.21.0.1" />-->
|
<!--<PackageVersion Include="Ryujinx.Audio.OpenAL.Dependencies" Version="1.21.0.1" />-->
|
||||||
<PackageVersion Include="Ryujinx.Audio.OpenAL" Version="1.25.1" />
|
<PackageVersion Include="Ryujinx.Audio.OpenAL" Version="1.25.1" />
|
||||||
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies.AllArch" Version="6.1.4-build6" />
|
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies.AllArch" Version="6.1.4-build6" />
|
||||||
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
|
<PackageVersion Include="Ryujinx.Graphics.Vulkan.MoltenVK" Version="1.4.2-ryujinx.3" />
|
||||||
<PackageVersion Include="Ryujinx.LibHac" Version="0.21.0-alpha.133" />
|
<PackageVersion Include="Ryujinx.LibHac" Version="0.21.0-alpha.133" />
|
||||||
<PackageVersion Include="Ryujinx.UpdateClient" Version="2.0.6" />
|
<PackageVersion Include="Ryujinx.UpdateClient" Version="2.0.6" />
|
||||||
<PackageVersion Include="Ryujinx.Systems.Update.Common" Version="2.0.6" />
|
<PackageVersion Include="Ryujinx.Systems.Update.Common" Version="2.0.6" />
|
||||||
|
|
@ -53,9 +53,10 @@
|
||||||
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
||||||
<PackageVersion Include="Sep" Version="0.14.1" />
|
<PackageVersion Include="Sep" Version="0.14.1" />
|
||||||
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
||||||
<PackageVersion Include="Silk.NET.Vulkan" Version="2.22.0" />
|
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.22.0" />
|
<PackageVersion Include="Silk.NET.Vulkan" Version="2.23.0" />
|
||||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.22.0" />
|
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.23.0" />
|
||||||
|
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.23.0" />
|
||||||
<PackageVersion Include="SkiaSharp" Version="2.88.9" />
|
<PackageVersion Include="SkiaSharp" Version="2.88.9" />
|
||||||
<PackageVersion Include="SkiaSharp.NativeAssets.Win32" Version="2.88.9" />
|
<PackageVersion Include="SkiaSharp.NativeAssets.Win32" Version="2.88.9" />
|
||||||
<PackageVersion Include="SkiaSharp.NativeAssets.macOS" Version="2.88.9" />
|
<PackageVersion Include="SkiaSharp.NativeAssets.macOS" Version="2.88.9" />
|
||||||
|
|
@ -64,4 +65,4 @@
|
||||||
<PackageVersion Include="System.IO.Hashing" Version="9.0.15" />
|
<PackageVersion Include="System.IO.Hashing" Version="9.0.15" />
|
||||||
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.1.3" />
|
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.1.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,12 @@ def get_new_name(
|
||||||
input_component = str(input_dylib_path).replace(str(input_directory), "")[1:]
|
input_component = str(input_dylib_path).replace(str(input_directory), "")[1:]
|
||||||
return Path(os.path.join(output_directory, input_component))
|
return Path(os.path.join(output_directory, input_component))
|
||||||
|
|
||||||
|
def get_archs(dylib_path: Path) -> list[str]:
|
||||||
def is_fat_file(dylib_path: Path) -> str:
|
res = subprocess.check_output([LIPO, "-info", str(dylib_path)]).decode("utf-8")
|
||||||
res = subprocess.check_output([LIPO, "-info", str(dylib_path.absolute())]).decode(
|
if res.startswith("Non-fat file"):
|
||||||
"utf-8"
|
return [res.split(":")[-1].strip()]
|
||||||
)
|
else:
|
||||||
|
return res.split("are:")[-1].strip().split()
|
||||||
return not res.split("\n")[0].startswith("Non-fat file")
|
|
||||||
|
|
||||||
|
|
||||||
def construct_universal_dylib(
|
def construct_universal_dylib(
|
||||||
arm64_input_dylib_path: Path, x86_64_input_dylib_path: Path, output_dylib_path: Path
|
arm64_input_dylib_path: Path, x86_64_input_dylib_path: Path, output_dylib_path: Path
|
||||||
|
|
@ -69,11 +67,12 @@ def construct_universal_dylib(
|
||||||
os.path.basename(arm64_input_dylib_path.resolve()), output_dylib_path
|
os.path.basename(arm64_input_dylib_path.resolve()), output_dylib_path
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if is_fat_file(arm64_input_dylib_path) or not x86_64_input_dylib_path.exists():
|
arm64_archs = get_archs(arm64_input_dylib_path)
|
||||||
with open(output_dylib_path, "wb") as dst:
|
x86_64_archs = get_archs(x86_64_input_dylib_path) if x86_64_input_dylib_path.exists() else []
|
||||||
with open(arm64_input_dylib_path, "rb") as src:
|
|
||||||
dst.write(src.read())
|
if "arm64" in arm64_archs and "x86_64" in arm64_archs:
|
||||||
else:
|
shutil.copy2(arm64_input_dylib_path, output_dylib_path)
|
||||||
|
elif x86_64_archs:
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
[
|
[
|
||||||
LIPO,
|
LIPO,
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
{
|
{
|
||||||
DescriptorSetLayout[] layouts = new DescriptorSetLayout[setDescriptors.Count];
|
DescriptorSetLayout[] layouts = new DescriptorSetLayout[setDescriptors.Count];
|
||||||
bool[] updateAfterBindFlags = new bool[setDescriptors.Count];
|
bool[] updateAfterBindFlags = new bool[setDescriptors.Count];
|
||||||
|
|
||||||
bool isMoltenVk = gd.IsMoltenVk;
|
bool isMoltenVk = gd.IsMoltenVk;
|
||||||
|
|
||||||
for (int setIndex = 0; setIndex < setDescriptors.Count; setIndex++)
|
for (int setIndex = 0; setIndex < setDescriptors.Count; setIndex++)
|
||||||
{
|
{
|
||||||
ResourceDescriptorCollection rdc = setDescriptors[setIndex];
|
ResourceDescriptorCollection rdc = setDescriptors[setIndex];
|
||||||
|
|
||||||
ResourceStages activeStages = ResourceStages.None;
|
ResourceStages activeStages = ResourceStages.None;
|
||||||
|
|
||||||
if (isMoltenVk)
|
if (isMoltenVk)
|
||||||
{
|
{
|
||||||
for (int descIndex = 0; descIndex < rdc.Descriptors.Count; descIndex++)
|
for (int descIndex = 0; descIndex < rdc.Descriptors.Count; descIndex++)
|
||||||
|
|
@ -42,12 +42,13 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
ResourceDescriptor descriptor = rdc.Descriptors[descIndex];
|
ResourceDescriptor descriptor = rdc.Descriptors[descIndex];
|
||||||
ResourceStages stages = descriptor.Stages;
|
ResourceStages stages = descriptor.Stages;
|
||||||
|
|
||||||
if (descriptor.Type == ResourceType.StorageBuffer && isMoltenVk)
|
if (descriptor.Type == ResourceType.StorageBuffer && gd.IsMoltenVk)
|
||||||
{
|
{
|
||||||
// There's a bug on MoltenVK where using the same buffer across different stages
|
// There's a bug in MoltenVK where using the same buffer across different stages
|
||||||
// causes invalid resource errors, allow the binding on all active stages as workaround.
|
// causes invalid resource errors, allow the binding on all active stages as workaround.
|
||||||
|
// https://github.com/KhronosGroup/MoltenVK/issues/1870
|
||||||
stages = activeStages;
|
stages = activeStages;
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutBindings[descIndex] = new DescriptorSetLayoutBinding
|
layoutBindings[descIndex] = new DescriptorSetLayoutBinding
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -435,8 +435,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
_physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState.ExtensionName),
|
_physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState.ExtensionName),
|
||||||
features2.Features.MultiViewport && !(IsMoltenVk && Vendor == Vendor.Amd), // Workaround for AMD on MoltenVK issue
|
features2.Features.MultiViewport && !(IsMoltenVk && Vendor == Vendor.Amd), // Workaround for AMD on MoltenVK issue
|
||||||
featuresRobustness2.NullDescriptor || IsMoltenVk,
|
featuresRobustness2.NullDescriptor || IsMoltenVk,
|
||||||
supportsPushDescriptors && !IsMoltenVk,
|
supportsPushDescriptors,
|
||||||
propertiesPushDescriptor.MaxPushDescriptors,
|
IsMoltenVk ? 16 : propertiesPushDescriptor.MaxPushDescriptors, // In case an old version of MoltenVK is used, apply a limit to prevent vertex explosions.
|
||||||
featuresPrimitiveTopologyListRestart.PrimitiveTopologyListRestart,
|
featuresPrimitiveTopologyListRestart.PrimitiveTopologyListRestart,
|
||||||
featuresPrimitiveTopologyListRestart.PrimitiveTopologyPatchListRestart,
|
featuresPrimitiveTopologyListRestart.PrimitiveTopologyPatchListRestart,
|
||||||
supportsTransformFeedback,
|
supportsTransformFeedback,
|
||||||
|
|
@ -775,10 +775,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
supportsShaderBallot: false,
|
supportsShaderBallot: false,
|
||||||
supportsShaderBarrierDivergence: Vendor != Vendor.Intel,
|
supportsShaderBarrierDivergence: Vendor != Vendor.Intel,
|
||||||
supportsShaderFloat64: Capabilities.SupportsShaderFloat64,
|
supportsShaderFloat64: Capabilities.SupportsShaderFloat64,
|
||||||
|
|
||||||
supportsShaderNonUniformIndexing:
|
supportsShaderNonUniformIndexing:
|
||||||
featuresVk12.ShaderSampledImageArrayNonUniformIndexing &&
|
featuresVk12.ShaderSampledImageArrayNonUniformIndexing &&
|
||||||
featuresVk12.ShaderStorageImageArrayNonUniformIndexing,
|
featuresVk12.ShaderStorageImageArrayNonUniformIndexing,
|
||||||
supportsTextureGatherOffsets: features2.Features.ShaderImageGatherExtended && !IsMoltenVk,
|
supportsTextureGatherOffsets: features2.Features.ShaderImageGatherExtended,
|
||||||
supportsTextureShadowLod: false,
|
supportsTextureShadowLod: false,
|
||||||
supportsVertexStoreAndAtomics: features2.Features.VertexPipelineStoresAndAtomics,
|
supportsVertexStoreAndAtomics: features2.Features.VertexPipelineStoresAndAtomics,
|
||||||
supportsViewportIndexVertexTessellation: featuresVk12.ShaderOutputViewportIndex,
|
supportsViewportIndexVertexTessellation: featuresVk12.ShaderOutputViewportIndex,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,10 @@
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
|
|
||||||
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" >
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,14 @@
|
||||||
<PublishTrimmed>true</PublishTrimmed>
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
<TrimMode>partial</TrimMode>
|
<TrimMode>partial</TrimMode>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
FluentAvalonia, used in the Avalonia UI, requires a workaround for the json serializer used internally when using .NET 8+ System.Text.Json.
|
FluentAvalonia, used in the Avalonia UI, requires a workaround for the json serializer used internally when using .NET 8+ System.Text.Json.
|
||||||
See:
|
See:
|
||||||
https://github.com/amwx/FluentAvalonia/issues/481
|
https://github.com/amwx/FluentAvalonia/issues/481
|
||||||
https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-8/
|
https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-8/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
|
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<PackageReference Include="OpenTK.Core" />
|
<PackageReference Include="OpenTK.Core" />
|
||||||
<PackageReference Include="Ryujinx.Audio.OpenAL" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'osx-x64' AND '$(RuntimeIdentifier)' != 'osx-arm64'" />
|
<PackageReference Include="Ryujinx.Audio.OpenAL" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'osx-x64' AND '$(RuntimeIdentifier)' != 'osx-arm64'" />
|
||||||
<PackageReference Include="Ryujinx.Graphics.Nvdec.Dependencies.AllArch" />
|
<PackageReference Include="Ryujinx.Graphics.Nvdec.Dependencies.AllArch" />
|
||||||
<PackageReference Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'win-x64' AND '$(RuntimeIdentifier)' != 'win-arm64'" />
|
<PackageReference Include="Ryujinx.Graphics.Vulkan.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'win-x64' AND '$(RuntimeIdentifier)' != 'win-arm64'" />
|
||||||
<PackageReference Include="Ryujinx.UpdateClient" />
|
<PackageReference Include="Ryujinx.UpdateClient" />
|
||||||
<PackageReference Include="Ryujinx.Systems.Update.Common" />
|
<PackageReference Include="Ryujinx.Systems.Update.Common" />
|
||||||
<PackageReference Include="securifybv.ShellLink" />
|
<PackageReference Include="securifybv.ShellLink" />
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />
|
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />
|
||||||
<PackageReference Include="SPB" />
|
<PackageReference Include="SPB" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ryujinx.Graphics.RenderDocApi\Ryujinx.Graphics.RenderDocApi.csproj" />
|
<ProjectReference Include="..\Ryujinx.Graphics.RenderDocApi\Ryujinx.Graphics.RenderDocApi.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj" />
|
<ProjectReference Include="..\Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue