Compare commits
63 Commits
Author | SHA1 | Date | |
---|---|---|---|
dde208b480 | |||
4c3d2d5d75 | |||
fab11ba3f1 | |||
332891b5ff | |||
7df4fcada7 | |||
d6698680be | |||
e5c9838b0b | |||
f8ec878796 | |||
9ff21f9ab6 | |||
aa021085cf | |||
1f5d881860 | |||
1f664100bd | |||
1f5e1ffa80 | |||
264438ff19 | |||
3b8ac1641a | |||
4250732353 | |||
4d1579acbf | |||
6279f5e430 | |||
b7d2bff6aa | |||
7c327fecb3 | |||
cc1a933a2f | |||
dd574146fb | |||
2c94ac455e | |||
e18d258fa0 | |||
36f10df775 | |||
680e548022 | |||
21c4176157 | |||
3b4ff2d6d9 | |||
12504f280c | |||
250fc51374 | |||
206e0882c2 | |||
609abc8b9b | |||
cee7121058 | |||
cd124bda58 | |||
9f12e50a54 | |||
097562bc6c | |||
db4242c5dc | |||
4dd77316f7 | |||
3f98369a17 | |||
c26aeefe03 | |||
666e05f5cb | |||
8d9d508dc7 | |||
e27f5522e2 | |||
add2a9d151 | |||
9e50dd99d7 | |||
0dec91bb42 | |||
d9b63353b0 | |||
eabd0ec93f | |||
138d5dc64a | |||
3e68a87d63 | |||
69b6ef7a4a | |||
40e87c634e | |||
79d1c190db | |||
2bc88467eb | |||
baf8752e74 | |||
d5e4378aea | |||
6dbcdfea47 | |||
c5258cf082 | |||
5c89e22bb9 | |||
11ecff2ff0 | |||
4c3f09644a | |||
e187a8870a | |||
a64fee29dc |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -61,13 +61,13 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test --no-build -c "${{ matrix.configuration }}"
|
run: dotnet test --no-build -c "${{ matrix.configuration }}"
|
||||||
- name: Publish Ryujinx
|
- name: Publish Ryujinx
|
||||||
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx --self-contained true
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx --self-contained true
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- name: Publish Ryujinx.Headless.SDL2
|
- name: Publish Ryujinx.Headless.SDL2
|
||||||
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_sdl2_headless -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx.Headless.SDL2 --self-contained true
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_sdl2_headless -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx.Headless.SDL2 --self-contained true
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- name: Publish Ryujinx.Ava
|
- name: Publish Ryujinx.Ava
|
||||||
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_ava -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx.Ava --self-contained true
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_ava -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx.Ava --self-contained true
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- name: Upload Ryujinx artifact
|
- name: Upload Ryujinx artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
2
.github/workflows/flatpak.yml
vendored
2
.github/workflows/flatpak.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
GIT_COMMITTER_NAME: "RyujinxBot"
|
GIT_COMMITTER_NAME: "RyujinxBot"
|
||||||
GIT_COMMITTER_EMAIL: "61127645+RyujinxBot@users.noreply.github.com"
|
GIT_COMMITTER_EMAIL: "61127645+RyujinxBot@users.noreply.github.com"
|
||||||
RYUJINX_PROJECT_FILE: "Ryujinx/Ryujinx.csproj"
|
RYUJINX_PROJECT_FILE: "src/Ryujinx/Ryujinx.csproj"
|
||||||
NUGET_SOURCES_DESTDIR: "nuget-sources"
|
NUGET_SOURCES_DESTDIR: "nuget-sources"
|
||||||
RYUJINX_VERSION: "${{ inputs.ryujinx_version }}"
|
RYUJINX_VERSION: "${{ inputs.ryujinx_version }}"
|
||||||
|
|
||||||
|
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@ -37,19 +37,19 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
- name: Configure for release
|
- name: Configure for release
|
||||||
run: |
|
run: |
|
||||||
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
||||||
sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
||||||
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
||||||
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
||||||
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Create output dir
|
- name: Create output dir
|
||||||
run: "mkdir release_output"
|
run: "mkdir release_output"
|
||||||
- name: Publish Windows
|
- name: Publish Windows
|
||||||
run: |
|
run: |
|
||||||
dotnet publish -c Release -r win10-x64 -o ./publish_windows/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained true
|
||||||
dotnet publish -c Release -r win10-x64 -o ./publish_windows_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained true
|
||||||
dotnet publish -c Release -r win10-x64 -o ./publish_windows_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Ava --self-contained true
|
||||||
- name: Packing Windows builds
|
- name: Packing Windows builds
|
||||||
run: |
|
run: |
|
||||||
pushd publish_windows
|
pushd publish_windows
|
||||||
@ -67,9 +67,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish Linux
|
- name: Publish Linux
|
||||||
run: |
|
run: |
|
||||||
dotnet publish -c Release -r linux-x64 -o ./publish_linux/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained true
|
||||||
dotnet publish -c Release -r linux-x64 -o ./publish_linux_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained true
|
||||||
dotnet publish -c Release -r linux-x64 -o ./publish_linux_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Ava --self-contained true
|
||||||
|
|
||||||
- name: Packing Linux builds
|
- name: Packing Linux builds
|
||||||
run: |
|
run: |
|
||||||
@ -104,7 +104,7 @@ jobs:
|
|||||||
name: ${{ steps.version_info.outputs.build_version }}
|
name: ${{ steps.version_info.outputs.build_version }}
|
||||||
artifacts: "release_output/*.tar.gz,release_output/*.zip"
|
artifacts: "release_output/*.tar.gz,release_output/*.zip"
|
||||||
tag: ${{ steps.version_info.outputs.build_version }}
|
tag: ${{ steps.version_info.outputs.build_version }}
|
||||||
body: "For more informations about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
body: "For more information about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
removeArtifacts: true
|
removeArtifacts: true
|
||||||
replacesArtifacts: true
|
replacesArtifacts: true
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
|
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
|
||||||
<PackageVersion Include="Concentus" Version="1.1.7" />
|
<PackageVersion Include="Concentus" Version="1.1.7" />
|
||||||
<PackageVersion Include="DiscordRichPresence" Version="1.1.3.18" />
|
<PackageVersion Include="DiscordRichPresence" Version="1.1.3.18" />
|
||||||
<PackageVersion Include="DynamicData" Version="7.13.1" />
|
<PackageVersion Include="DynamicData" Version="7.13.5" />
|
||||||
<PackageVersion Include="FluentAvaloniaUI" Version="1.4.5" />
|
<PackageVersion Include="FluentAvaloniaUI" Version="1.4.5" />
|
||||||
<PackageVersion Include="GtkSharp.Dependencies" Version="1.1.1" />
|
<PackageVersion Include="GtkSharp.Dependencies" Version="1.1.1" />
|
||||||
<PackageVersion Include="GtkSharp.Dependencies.osx" Version="0.0.5" />
|
<PackageVersion Include="GtkSharp.Dependencies.osx" Version="0.0.5" />
|
||||||
@ -44,9 +44,9 @@
|
|||||||
<PackageVersion Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta11" />
|
<PackageVersion Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta11" />
|
||||||
<PackageVersion Include="SPB" Version="0.0.4-build28" />
|
<PackageVersion Include="SPB" Version="0.0.4-build28" />
|
||||||
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" />
|
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" />
|
||||||
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="6.28.1" />
|
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="6.30.0" />
|
||||||
<PackageVersion Include="System.IO.Hashing" Version="7.0.0" />
|
<PackageVersion Include="System.IO.Hashing" Version="7.0.0" />
|
||||||
<PackageVersion Include="System.Management" Version="7.0.0" />
|
<PackageVersion Include="System.Management" Version="7.0.1" />
|
||||||
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.0.2-rc1-fb78016" />
|
<PackageVersion Include="UnicornEngine.Unicorn" Version="2.0.2-rc1-fb78016" />
|
||||||
<PackageVersion Include="XamlNameReferenceGenerator" Version="1.6.1" />
|
<PackageVersion Include="XamlNameReferenceGenerator" Version="1.6.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
As of November 2022, Ryujinx has been tested on approximately 3,800 titles; over 3,600 boot past menus and into gameplay, with roughly 3,200 of those being considered playable.
|
As of April 2023, Ryujinx has been tested on approximately 4,050 titles; over 4,000 boot past menus and into gameplay, with roughly 3,400 of those being considered playable.
|
||||||
You can check out the compatibility list [here](https://github.com/Ryujinx/Ryujinx-Games-List/issues). Anyone is free to submit a new game test or update an existing game test entry; simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue. Use the search function to see if a game has been tested already!
|
You can check out the compatibility list [here](https://github.com/Ryujinx/Ryujinx-Games-List/issues). Anyone is free to submit a new game test or update an existing game test entry; simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue. Use the search function to see if a game has been tested already!
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -1,177 +0,0 @@
|
|||||||
<UserControl
|
|
||||||
x:Class="Ryujinx.Ava.UI.Controls.GameGridView"
|
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:flex="clr-namespace:Avalonia.Flexbox;assembly=Avalonia.Flexbox"
|
|
||||||
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
|
||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Focusable="True">
|
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
<MenuFlyout x:Key="GameContextMenu">
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding ToggleFavorite}"
|
|
||||||
Header="{locale:Locale GameListContextMenuToggleFavorite}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuToggleFavoriteToolTip}" />
|
|
||||||
<Separator />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenUserSaveDirectory}"
|
|
||||||
IsEnabled="{Binding EnabledUserSaveDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuOpenUserSaveDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserSaveDirectoryToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenDeviceSaveDirectory}"
|
|
||||||
IsEnabled="{Binding EnabledDeviceSaveDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuOpenDeviceSaveDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuOpenDeviceSaveDirectoryToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenBcatSaveDirectory}"
|
|
||||||
IsEnabled="{Binding EnabledBcatSaveDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuOpenBcatSaveDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuOpenBcatSaveDirectoryToolTip}" />
|
|
||||||
<Separator />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenTitleUpdateManager}"
|
|
||||||
Header="{locale:Locale GameListContextMenuManageTitleUpdates}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuManageTitleUpdatesToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenDownloadableContentManager}"
|
|
||||||
Header="{locale:Locale GameListContextMenuManageDlc}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuManageDlcToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenCheatManager}"
|
|
||||||
Header="{locale:Locale GameListContextMenuManageCheat}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuManageCheatToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenModsDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuOpenModsDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuOpenModsDirectoryToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenSdModsDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuOpenSdModsDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuOpenSdModsDirectoryToolTip}" />
|
|
||||||
<Separator />
|
|
||||||
<MenuItem Header="{locale:Locale GameListContextMenuCacheManagement}">
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding PurgePtcCache}"
|
|
||||||
Header="{locale:Locale GameListContextMenuCacheManagementPurgePptc}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding PurgeShaderCache}"
|
|
||||||
Header="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCache}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCacheToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenPtcDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectoryToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding OpenShaderCacheDirectory}"
|
|
||||||
Header="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectory}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectoryToolTip}" />
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="{locale:Locale GameListContextMenuExtractData}">
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding ExtractExeFs}"
|
|
||||||
Header="{locale:Locale GameListContextMenuExtractDataExeFS}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataExeFSToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding ExtractRomFs}"
|
|
||||||
Header="{locale:Locale GameListContextMenuExtractDataRomFS}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataRomFSToolTip}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding ExtractLogo}"
|
|
||||||
Header="{locale:Locale GameListContextMenuExtractDataLogo}"
|
|
||||||
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataLogoToolTip}" />
|
|
||||||
</MenuItem>
|
|
||||||
</MenuFlyout>
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<ListBox
|
|
||||||
Grid.Row="0"
|
|
||||||
Padding="8"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
ContextFlyout="{StaticResource GameContextMenu}"
|
|
||||||
DoubleTapped="GameList_DoubleTapped"
|
|
||||||
Items="{Binding AppsObservableList}"
|
|
||||||
SelectionChanged="GameList_SelectionChanged">
|
|
||||||
<ListBox.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<flex:FlexPanel
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
AlignContent="FlexStart"
|
|
||||||
JustifyContent="Center" />
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ListBox.ItemsPanel>
|
|
||||||
<ListBox.Styles>
|
|
||||||
<Style Selector="ListBoxItem">
|
|
||||||
<Setter Property="Margin" Value="5" />
|
|
||||||
<Setter Property="CornerRadius" Value="4" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ListBoxItem:selected /template/ Border#SelectionIndicator">
|
|
||||||
<Setter Property="MinHeight" Value="{Binding $parent[UserControl].DataContext.GridItemSelectorSize}" />
|
|
||||||
</Style>
|
|
||||||
</ListBox.Styles>
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid>
|
|
||||||
<Border
|
|
||||||
Margin="10"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}"
|
|
||||||
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}"
|
|
||||||
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}"
|
|
||||||
Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}"
|
|
||||||
ClipToBounds="True"
|
|
||||||
CornerRadius="4">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Image
|
|
||||||
Grid.Row="0"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
|
||||||
<Panel
|
|
||||||
Grid.Row="1"
|
|
||||||
Height="50"
|
|
||||||
Margin="0 10 0 0"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
IsVisible="{Binding $parent[UserControl].DataContext.ShowNames}">
|
|
||||||
<TextBlock
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{Binding TitleName}"
|
|
||||||
TextAlignment="Center"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
</Panel>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<ui:SymbolIcon
|
|
||||||
Margin="5,5,0,0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{DynamicResource SystemAccentColor}"
|
|
||||||
IsVisible="{Binding Favorite}"
|
|
||||||
Symbol="StarFilled" />
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
@ -1,32 +0,0 @@
|
|||||||
<UserControl
|
|
||||||
x:Class="Ryujinx.Ava.UI.Controls.InputDialog"
|
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Focusable="True">
|
|
||||||
<Grid
|
|
||||||
Margin="5,10,5,5"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{Binding Message}" />
|
|
||||||
<TextBox
|
|
||||||
Grid.Row="1"
|
|
||||||
Width="300"
|
|
||||||
Margin="10"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
MaxLength="{Binding MaxLength}"
|
|
||||||
Text="{Binding Input, Mode=TwoWay}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="2"
|
|
||||||
Margin="5,5,5,10"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Text="{Binding SubMessage}" />
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
@ -1,57 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using FluentAvalonia.UI.Controls;
|
|
||||||
using Ryujinx.Ava.Common.Locale;
|
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
|
||||||
using Ryujinx.Ava.UI.Models;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Controls
|
|
||||||
{
|
|
||||||
public partial class InputDialog : UserControl
|
|
||||||
{
|
|
||||||
public string Message { get; set; }
|
|
||||||
public string Input { get; set; }
|
|
||||||
public string SubMessage { get; set; }
|
|
||||||
|
|
||||||
public uint MaxLength { get; }
|
|
||||||
|
|
||||||
public InputDialog(string message, string input = "", string subMessage = "", uint maxLength = int.MaxValue)
|
|
||||||
{
|
|
||||||
Message = message;
|
|
||||||
Input = input;
|
|
||||||
SubMessage = subMessage;
|
|
||||||
MaxLength = maxLength;
|
|
||||||
|
|
||||||
DataContext = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public InputDialog()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async Task<(UserResult Result, string Input)> ShowInputDialog(string title, string message,
|
|
||||||
string input = "", string subMessage = "", uint maxLength = int.MaxValue)
|
|
||||||
{
|
|
||||||
UserResult result = UserResult.Cancel;
|
|
||||||
|
|
||||||
InputDialog content = new InputDialog(message, input, subMessage, maxLength);
|
|
||||||
ContentDialog contentDialog = new ContentDialog
|
|
||||||
{
|
|
||||||
Title = title,
|
|
||||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
|
||||||
SecondaryButtonText = "",
|
|
||||||
CloseButtonText = LocaleManager.Instance[LocaleKeys.InputDialogCancel],
|
|
||||||
Content = content,
|
|
||||||
PrimaryButtonCommand = MiniCommand.Create(() =>
|
|
||||||
{
|
|
||||||
result = UserResult.Ok;
|
|
||||||
input = content.Input;
|
|
||||||
})
|
|
||||||
};
|
|
||||||
await contentDialog.ShowAsync();
|
|
||||||
|
|
||||||
return (result, input);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
using Ryujinx.Memory.Tracking;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.Cpu.Tracking
|
|
||||||
{
|
|
||||||
public class CpuMultiRegionHandle : IMultiRegionHandle
|
|
||||||
{
|
|
||||||
private readonly MultiRegionHandle _impl;
|
|
||||||
|
|
||||||
public bool Dirty => _impl.Dirty;
|
|
||||||
|
|
||||||
internal CpuMultiRegionHandle(MultiRegionHandle impl)
|
|
||||||
{
|
|
||||||
_impl = impl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() => _impl.Dispose();
|
|
||||||
public void ForceDirty(ulong address, ulong size) => _impl.ForceDirty(address, size);
|
|
||||||
public IEnumerable<IRegionHandle> GetHandles() => _impl.GetHandles();
|
|
||||||
public void QueryModified(Action<ulong, ulong> modifiedAction) => _impl.QueryModified(modifiedAction);
|
|
||||||
public void QueryModified(ulong address, ulong size, Action<ulong, ulong> modifiedAction) => _impl.QueryModified(address, size, modifiedAction);
|
|
||||||
public void QueryModified(ulong address, ulong size, Action<ulong, ulong> modifiedAction, int sequenceNumber) => _impl.QueryModified(address, size, modifiedAction, sequenceNumber);
|
|
||||||
public void RegisterAction(ulong address, ulong size, RegionSignal action) => _impl.RegisterAction(address, size, action);
|
|
||||||
public void RegisterPreciseAction(ulong address, ulong size, PreciseRegionSignal action) => _impl.RegisterPreciseAction(address, size, action);
|
|
||||||
public void SignalWrite() => _impl.SignalWrite();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
using Ryujinx.Memory.Tracking;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Cpu.Tracking
|
|
||||||
{
|
|
||||||
public class CpuRegionHandle : IRegionHandle
|
|
||||||
{
|
|
||||||
private readonly RegionHandle _impl;
|
|
||||||
|
|
||||||
public bool Dirty => _impl.Dirty;
|
|
||||||
public bool Unmapped => _impl.Unmapped;
|
|
||||||
public ulong Address => _impl.Address;
|
|
||||||
public ulong Size => _impl.Size;
|
|
||||||
public ulong EndAddress => _impl.EndAddress;
|
|
||||||
|
|
||||||
internal CpuRegionHandle(RegionHandle impl)
|
|
||||||
{
|
|
||||||
_impl = impl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() => _impl.Dispose();
|
|
||||||
public bool DirtyOrVolatile() => _impl.DirtyOrVolatile();
|
|
||||||
public void ForceDirty() => _impl.ForceDirty();
|
|
||||||
public IRegionHandle GetHandle() => _impl;
|
|
||||||
public void RegisterAction(RegionSignal action) => _impl.RegisterAction(action);
|
|
||||||
public void RegisterPreciseAction(PreciseRegionSignal action) => _impl.RegisterPreciseAction(action);
|
|
||||||
public void RegisterDirtyEvent(Action action) => _impl.RegisterDirtyEvent(action);
|
|
||||||
public void Reprotect(bool asDirty = false) => _impl.Reprotect(asDirty);
|
|
||||||
|
|
||||||
public bool OverlapsWith(ulong address, ulong size) => _impl.OverlapsWith(address, size);
|
|
||||||
|
|
||||||
public bool RangeEquals(CpuRegionHandle other)
|
|
||||||
{
|
|
||||||
return _impl.RealAddress == other._impl.RealAddress && _impl.RealSize == other._impl.RealSize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
using Ryujinx.Memory.Tracking;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Cpu.Tracking
|
|
||||||
{
|
|
||||||
public class CpuSmartMultiRegionHandle : IMultiRegionHandle
|
|
||||||
{
|
|
||||||
private readonly SmartMultiRegionHandle _impl;
|
|
||||||
|
|
||||||
public bool Dirty => _impl.Dirty;
|
|
||||||
|
|
||||||
internal CpuSmartMultiRegionHandle(SmartMultiRegionHandle impl)
|
|
||||||
{
|
|
||||||
_impl = impl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() => _impl.Dispose();
|
|
||||||
public void ForceDirty(ulong address, ulong size) => _impl.ForceDirty(address, size);
|
|
||||||
public void RegisterAction(RegionSignal action) => _impl.RegisterAction(action);
|
|
||||||
public void RegisterPreciseAction(PreciseRegionSignal action) => _impl.RegisterPreciseAction(action);
|
|
||||||
public void QueryModified(Action<ulong, ulong> modifiedAction) => _impl.QueryModified(modifiedAction);
|
|
||||||
public void QueryModified(ulong address, ulong size, Action<ulong, ulong> modifiedAction) => _impl.QueryModified(address, size, modifiedAction);
|
|
||||||
public void QueryModified(ulong address, ulong size, Action<ulong, ulong> modifiedAction, int sequenceNumber) => _impl.QueryModified(address, size, modifiedAction, sequenceNumber);
|
|
||||||
public void SignalWrite() => _impl.SignalWrite();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
namespace Ryujinx.Graphics.Gpu.Memory
|
|
||||||
{
|
|
||||||
public class UnmapEventArgs
|
|
||||||
{
|
|
||||||
public ulong Address { get; }
|
|
||||||
public ulong Size { get; }
|
|
||||||
|
|
||||||
public UnmapEventArgs(ulong address, ulong size)
|
|
||||||
{
|
|
||||||
Address = address;
|
|
||||||
Size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,505 +0,0 @@
|
|||||||
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
|
|
||||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
|
||||||
using Ryujinx.Graphics.Shader.Translation;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Numerics;
|
|
||||||
|
|
||||||
using static Ryujinx.Graphics.Shader.StructuredIr.InstructionInfo;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|
||||||
{
|
|
||||||
class OperandManager
|
|
||||||
{
|
|
||||||
private static readonly string[] StagePrefixes = new string[] { "cp", "vp", "tcp", "tep", "gp", "fp" };
|
|
||||||
|
|
||||||
private readonly struct BuiltInAttribute
|
|
||||||
{
|
|
||||||
public string Name { get; }
|
|
||||||
|
|
||||||
public AggregateType Type { get; }
|
|
||||||
|
|
||||||
public BuiltInAttribute(string name, AggregateType type)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Type = type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Dictionary<int, BuiltInAttribute> _builtInAttributes = new Dictionary<int, BuiltInAttribute>()
|
|
||||||
{
|
|
||||||
{ AttributeConsts.Layer, new BuiltInAttribute("gl_Layer", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PointSize, new BuiltInAttribute("gl_PointSize", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionX, new BuiltInAttribute("gl_Position.x", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionY, new BuiltInAttribute("gl_Position.y", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionZ, new BuiltInAttribute("gl_Position.z", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionW, new BuiltInAttribute("gl_Position.w", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance0, new BuiltInAttribute("gl_ClipDistance[0]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance1, new BuiltInAttribute("gl_ClipDistance[1]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance2, new BuiltInAttribute("gl_ClipDistance[2]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance3, new BuiltInAttribute("gl_ClipDistance[3]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance4, new BuiltInAttribute("gl_ClipDistance[4]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance5, new BuiltInAttribute("gl_ClipDistance[5]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance6, new BuiltInAttribute("gl_ClipDistance[6]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance7, new BuiltInAttribute("gl_ClipDistance[7]", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PointCoordX, new BuiltInAttribute("gl_PointCoord.x", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PointCoordY, new BuiltInAttribute("gl_PointCoord.y", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessCoordX, new BuiltInAttribute("gl_TessCoord.x", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessCoordY, new BuiltInAttribute("gl_TessCoord.y", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.InstanceId, new BuiltInAttribute("gl_InstanceID", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.VertexId, new BuiltInAttribute("gl_VertexID", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.BaseInstance, new BuiltInAttribute("gl_BaseInstanceARB", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.BaseVertex, new BuiltInAttribute("gl_BaseVertexARB", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.InstanceIndex, new BuiltInAttribute("gl_InstanceIndex", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.VertexIndex, new BuiltInAttribute("gl_VertexIndex", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.DrawIndex, new BuiltInAttribute("gl_DrawIDARB", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.FrontFacing, new BuiltInAttribute("gl_FrontFacing", AggregateType.Bool) },
|
|
||||||
|
|
||||||
// Special.
|
|
||||||
{ AttributeConsts.FragmentOutputDepth, new BuiltInAttribute("gl_FragDepth", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ThreadKill, new BuiltInAttribute("gl_HelperInvocation", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.ThreadIdX, new BuiltInAttribute("gl_LocalInvocationID.x", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.ThreadIdY, new BuiltInAttribute("gl_LocalInvocationID.y", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.ThreadIdZ, new BuiltInAttribute("gl_LocalInvocationID.z", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdX, new BuiltInAttribute("gl_WorkGroupID.x", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdY, new BuiltInAttribute("gl_WorkGroupID.y", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdZ, new BuiltInAttribute("gl_WorkGroupID.z", AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LaneId, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.InvocationId, new BuiltInAttribute("gl_InvocationID", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PrimitiveId, new BuiltInAttribute("gl_PrimitiveID", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PatchVerticesIn, new BuiltInAttribute("gl_PatchVerticesIn", AggregateType.S32) },
|
|
||||||
{ AttributeConsts.EqMask, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.GeMask, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.GtMask, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LeMask, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LtMask, new BuiltInAttribute(null, AggregateType.U32) },
|
|
||||||
|
|
||||||
// Support uniforms.
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 0, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[0]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 4, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[1]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 8, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[2]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 12, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[3]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 16, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[4]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 20, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[5]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 24, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[6]", AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.FragmentOutputIsBgraBase + 28, new BuiltInAttribute($"{DefaultNames.SupportBlockIsBgraName}[7]", AggregateType.Bool) },
|
|
||||||
|
|
||||||
{ AttributeConsts.SupportBlockViewInverseX, new BuiltInAttribute($"{DefaultNames.SupportBlockViewportInverse}.x", AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.SupportBlockViewInverseY, new BuiltInAttribute($"{DefaultNames.SupportBlockViewportInverse}.y", AggregateType.FP32) }
|
|
||||||
};
|
|
||||||
|
|
||||||
private Dictionary<AstOperand, string> _locals;
|
|
||||||
|
|
||||||
public OperandManager()
|
|
||||||
{
|
|
||||||
_locals = new Dictionary<AstOperand, string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string DeclareLocal(AstOperand operand)
|
|
||||||
{
|
|
||||||
string name = $"{DefaultNames.LocalNamePrefix}_{_locals.Count}";
|
|
||||||
|
|
||||||
_locals.Add(operand, name);
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetExpression(CodeGenContext context, AstOperand operand)
|
|
||||||
{
|
|
||||||
return operand.Type switch
|
|
||||||
{
|
|
||||||
OperandType.Argument => GetArgumentName(operand.Value),
|
|
||||||
OperandType.Attribute => GetAttributeName(context, operand.Value, perPatch: false),
|
|
||||||
OperandType.AttributePerPatch => GetAttributeName(context, operand.Value, perPatch: true),
|
|
||||||
OperandType.Constant => NumberFormatter.FormatInt(operand.Value),
|
|
||||||
OperandType.ConstantBuffer => GetConstantBufferName(operand, context.Config),
|
|
||||||
OperandType.LocalVariable => _locals[operand],
|
|
||||||
OperandType.Undefined => DefaultNames.UndefinedName,
|
|
||||||
_ => throw new ArgumentException($"Invalid operand type \"{operand.Type}\".")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetConstantBufferName(AstOperand operand, ShaderConfig config)
|
|
||||||
{
|
|
||||||
return GetConstantBufferName(operand.CbufSlot, operand.CbufOffset, config.Stage, config.UsedFeatures.HasFlag(FeatureFlags.CbIndexing));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetConstantBufferName(int slot, int offset, ShaderStage stage, bool cbIndexable)
|
|
||||||
{
|
|
||||||
return $"{GetUbName(stage, slot, cbIndexable)}[{offset >> 2}].{GetSwizzleMask(offset & 3)}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetVec4Indexed(string vectorName, string indexExpr, bool indexElement)
|
|
||||||
{
|
|
||||||
if (indexElement)
|
|
||||||
{
|
|
||||||
return $"{vectorName}[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
string result = $"{vectorName}.x";
|
|
||||||
for (int i = 1; i < 4; i++)
|
|
||||||
{
|
|
||||||
result = $"(({indexExpr}) == {i}) ? ({vectorName}.{GetSwizzleMask(i)}) : ({result})";
|
|
||||||
}
|
|
||||||
return $"({result})";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetConstantBufferName(int slot, string offsetExpr, ShaderStage stage, bool cbIndexable, bool indexElement)
|
|
||||||
{
|
|
||||||
return GetVec4Indexed(GetUbName(stage, slot, cbIndexable) + $"[{offsetExpr} >> 2]", offsetExpr + " & 3", indexElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetConstantBufferName(string slotExpr, string offsetExpr, ShaderStage stage, bool indexElement)
|
|
||||||
{
|
|
||||||
return GetVec4Indexed(GetUbName(stage, slotExpr) + $"[{offsetExpr} >> 2]", offsetExpr + " & 3", indexElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetOutAttributeName(CodeGenContext context, int value, bool perPatch)
|
|
||||||
{
|
|
||||||
return GetAttributeName(context, value, perPatch, isOutAttr: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetAttributeName(CodeGenContext context, int value, bool perPatch, bool isOutAttr = false, string indexExpr = "0")
|
|
||||||
{
|
|
||||||
ShaderConfig config = context.Config;
|
|
||||||
|
|
||||||
if ((value & AttributeConsts.LoadOutputMask) != 0)
|
|
||||||
{
|
|
||||||
isOutAttr = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
value &= AttributeConsts.Mask & ~3;
|
|
||||||
char swzMask = GetSwizzleMask((value >> 2) & 3);
|
|
||||||
|
|
||||||
if (perPatch)
|
|
||||||
{
|
|
||||||
if (value >= AttributeConsts.UserAttributePerPatchBase && value < AttributeConsts.UserAttributePerPatchEnd)
|
|
||||||
{
|
|
||||||
value -= AttributeConsts.UserAttributePerPatchBase;
|
|
||||||
|
|
||||||
return $"{DefaultNames.PerPatchAttributePrefix}{(value >> 4)}.{swzMask}";
|
|
||||||
}
|
|
||||||
else if (value < AttributeConsts.UserAttributePerPatchBase)
|
|
||||||
{
|
|
||||||
return value switch
|
|
||||||
{
|
|
||||||
AttributeConsts.TessLevelOuter0 => "gl_TessLevelOuter[0]",
|
|
||||||
AttributeConsts.TessLevelOuter1 => "gl_TessLevelOuter[1]",
|
|
||||||
AttributeConsts.TessLevelOuter2 => "gl_TessLevelOuter[2]",
|
|
||||||
AttributeConsts.TessLevelOuter3 => "gl_TessLevelOuter[3]",
|
|
||||||
AttributeConsts.TessLevelInner0 => "gl_TessLevelInner[0]",
|
|
||||||
AttributeConsts.TessLevelInner1 => "gl_TessLevelInner[1]",
|
|
||||||
_ => null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (value >= AttributeConsts.UserAttributeBase && value < AttributeConsts.UserAttributeEnd)
|
|
||||||
{
|
|
||||||
int attrOffset = value;
|
|
||||||
value -= AttributeConsts.UserAttributeBase;
|
|
||||||
|
|
||||||
string prefix = isOutAttr
|
|
||||||
? DefaultNames.OAttributePrefix
|
|
||||||
: DefaultNames.IAttributePrefix;
|
|
||||||
|
|
||||||
bool indexable = config.UsedFeatures.HasFlag(isOutAttr ? FeatureFlags.OaIndexing : FeatureFlags.IaIndexing);
|
|
||||||
|
|
||||||
if (indexable)
|
|
||||||
{
|
|
||||||
string name = prefix;
|
|
||||||
|
|
||||||
if (config.Stage == ShaderStage.Geometry && !isOutAttr)
|
|
||||||
{
|
|
||||||
name += $"[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return name + $"[{(value >> 4)}]." + swzMask;
|
|
||||||
}
|
|
||||||
else if (config.TransformFeedbackEnabled &&
|
|
||||||
((config.LastInVertexPipeline && isOutAttr) ||
|
|
||||||
(config.Stage == ShaderStage.Fragment && !isOutAttr)))
|
|
||||||
{
|
|
||||||
int components = config.LastInPipeline ? context.Info.GetTransformFeedbackOutputComponents(attrOffset) : 1;
|
|
||||||
string name = components > 1 ? $"{prefix}{(value >> 4)}" : $"{prefix}{(value >> 4)}_{swzMask}";
|
|
||||||
|
|
||||||
if (AttributeInfo.IsArrayAttributeGlsl(config.Stage, isOutAttr))
|
|
||||||
{
|
|
||||||
name += isOutAttr ? "[gl_InvocationID]" : $"[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return components > 1 ? name + '.' + swzMask : name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string name = $"{prefix}{(value >> 4)}";
|
|
||||||
|
|
||||||
if (AttributeInfo.IsArrayAttributeGlsl(config.Stage, isOutAttr))
|
|
||||||
{
|
|
||||||
name += isOutAttr ? "[gl_InvocationID]" : $"[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return name + '.' + swzMask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (value >= AttributeConsts.FragmentOutputColorBase && value < AttributeConsts.FragmentOutputColorEnd)
|
|
||||||
{
|
|
||||||
value -= AttributeConsts.FragmentOutputColorBase;
|
|
||||||
|
|
||||||
return $"{DefaultNames.OAttributePrefix}{(value >> 4)}.{swzMask}";
|
|
||||||
}
|
|
||||||
else if (_builtInAttributes.TryGetValue(value, out BuiltInAttribute builtInAttr))
|
|
||||||
{
|
|
||||||
string subgroupMask = value switch
|
|
||||||
{
|
|
||||||
AttributeConsts.EqMask => "Eq",
|
|
||||||
AttributeConsts.GeMask => "Ge",
|
|
||||||
AttributeConsts.GtMask => "Gt",
|
|
||||||
AttributeConsts.LeMask => "Le",
|
|
||||||
AttributeConsts.LtMask => "Lt",
|
|
||||||
_ => null
|
|
||||||
};
|
|
||||||
|
|
||||||
if (subgroupMask != null)
|
|
||||||
{
|
|
||||||
return config.GpuAccessor.QueryHostSupportsShaderBallot()
|
|
||||||
? $"unpackUint2x32(gl_SubGroup{subgroupMask}MaskARB).x"
|
|
||||||
: $"gl_Subgroup{subgroupMask}Mask.x";
|
|
||||||
}
|
|
||||||
else if (value == AttributeConsts.LaneId)
|
|
||||||
{
|
|
||||||
return config.GpuAccessor.QueryHostSupportsShaderBallot()
|
|
||||||
? "gl_SubGroupInvocationARB"
|
|
||||||
: "gl_SubgroupInvocationID";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.Stage == ShaderStage.Fragment)
|
|
||||||
{
|
|
||||||
// TODO: There must be a better way to handle this...
|
|
||||||
switch (value)
|
|
||||||
{
|
|
||||||
case AttributeConsts.PositionX: return $"(gl_FragCoord.x / {DefaultNames.SupportBlockRenderScaleName}[0])";
|
|
||||||
case AttributeConsts.PositionY: return $"(gl_FragCoord.y / {DefaultNames.SupportBlockRenderScaleName}[0])";
|
|
||||||
case AttributeConsts.PositionZ: return "gl_FragCoord.z";
|
|
||||||
case AttributeConsts.PositionW: return "gl_FragCoord.w";
|
|
||||||
|
|
||||||
case AttributeConsts.FrontFacing:
|
|
||||||
if (config.GpuAccessor.QueryHostHasFrontFacingBug())
|
|
||||||
{
|
|
||||||
// This is required for Intel on Windows, gl_FrontFacing sometimes returns incorrect
|
|
||||||
// (flipped) values. Doing this seems to fix it.
|
|
||||||
return "(-floatBitsToInt(float(gl_FrontFacing)) < 0)";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string name = builtInAttr.Name;
|
|
||||||
|
|
||||||
if (AttributeInfo.IsArrayAttributeGlsl(config.Stage, isOutAttr) && AttributeInfo.IsArrayBuiltIn(value))
|
|
||||||
{
|
|
||||||
name = isOutAttr ? $"gl_out[gl_InvocationID].{name}" : $"gl_in[{indexExpr}].{name}";
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Warn about unknown built-in attribute.
|
|
||||||
|
|
||||||
return isOutAttr ? "// bad_attr0x" + value.ToString("X") : "0.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetAttributeName(string attrExpr, ShaderConfig config, bool isOutAttr = false, string indexExpr = "0")
|
|
||||||
{
|
|
||||||
string name = isOutAttr
|
|
||||||
? DefaultNames.OAttributePrefix
|
|
||||||
: DefaultNames.IAttributePrefix;
|
|
||||||
|
|
||||||
if (config.Stage == ShaderStage.Geometry && !isOutAttr)
|
|
||||||
{
|
|
||||||
name += $"[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{name}[{attrExpr} >> 2][{attrExpr} & 3]";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetUbName(ShaderStage stage, int slot, bool cbIndexable)
|
|
||||||
{
|
|
||||||
if (cbIndexable)
|
|
||||||
{
|
|
||||||
return GetUbName(stage, NumberFormatter.FormatInt(slot, AggregateType.S32));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{GetShaderStagePrefix(stage)}_{DefaultNames.UniformNamePrefix}{slot}_{DefaultNames.UniformNameSuffix}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetUbName(ShaderStage stage, string slotExpr)
|
|
||||||
{
|
|
||||||
return $"{GetShaderStagePrefix(stage)}_{DefaultNames.UniformNamePrefix}[{slotExpr}].{DefaultNames.DataName}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetSamplerName(ShaderStage stage, AstTextureOperation texOp, string indexExpr)
|
|
||||||
{
|
|
||||||
return GetSamplerName(stage, texOp.CbufSlot, texOp.Handle, texOp.Type.HasFlag(SamplerType.Indexed), indexExpr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetSamplerName(ShaderStage stage, int cbufSlot, int handle, bool indexed, string indexExpr)
|
|
||||||
{
|
|
||||||
string suffix = cbufSlot < 0 ? $"_tcb_{handle:X}" : $"_cb{cbufSlot}_{handle:X}";
|
|
||||||
|
|
||||||
if (indexed)
|
|
||||||
{
|
|
||||||
suffix += $"a[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetShaderStagePrefix(stage) + "_" + DefaultNames.SamplerNamePrefix + suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetImageName(ShaderStage stage, AstTextureOperation texOp, string indexExpr)
|
|
||||||
{
|
|
||||||
return GetImageName(stage, texOp.CbufSlot, texOp.Handle, texOp.Format, texOp.Type.HasFlag(SamplerType.Indexed), indexExpr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetImageName(
|
|
||||||
ShaderStage stage,
|
|
||||||
int cbufSlot,
|
|
||||||
int handle,
|
|
||||||
TextureFormat format,
|
|
||||||
bool indexed,
|
|
||||||
string indexExpr)
|
|
||||||
{
|
|
||||||
string suffix = cbufSlot < 0
|
|
||||||
? $"_tcb_{handle:X}_{format.ToGlslFormat()}"
|
|
||||||
: $"_cb{cbufSlot}_{handle:X}_{format.ToGlslFormat()}";
|
|
||||||
|
|
||||||
if (indexed)
|
|
||||||
{
|
|
||||||
suffix += $"a[{indexExpr}]";
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetShaderStagePrefix(stage) + "_" + DefaultNames.ImageNamePrefix + suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetShaderStagePrefix(ShaderStage stage)
|
|
||||||
{
|
|
||||||
int index = (int)stage;
|
|
||||||
|
|
||||||
if ((uint)index >= StagePrefixes.Length)
|
|
||||||
{
|
|
||||||
return "invalid";
|
|
||||||
}
|
|
||||||
|
|
||||||
return StagePrefixes[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
private static char GetSwizzleMask(int value)
|
|
||||||
{
|
|
||||||
return "xyzw"[value];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetArgumentName(int argIndex)
|
|
||||||
{
|
|
||||||
return $"{DefaultNames.ArgumentNamePrefix}{argIndex}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AggregateType GetNodeDestType(CodeGenContext context, IAstNode node, bool isAsgDest = false)
|
|
||||||
{
|
|
||||||
if (node is AstOperation operation)
|
|
||||||
{
|
|
||||||
if (operation.Inst == Instruction.LoadAttribute)
|
|
||||||
{
|
|
||||||
// Load attribute basically just returns the attribute value.
|
|
||||||
// Some built-in attributes may have different types, so we need
|
|
||||||
// to return the type based on the attribute that is being read.
|
|
||||||
if (operation.GetSource(0) is AstOperand operand && operand.Type == OperandType.Constant)
|
|
||||||
{
|
|
||||||
if (_builtInAttributes.TryGetValue(operand.Value & ~3, out BuiltInAttribute builtInAttr))
|
|
||||||
{
|
|
||||||
return builtInAttr.Type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return OperandInfo.GetVarType(OperandType.Attribute);
|
|
||||||
}
|
|
||||||
else if (operation.Inst == Instruction.Call)
|
|
||||||
{
|
|
||||||
AstOperand funcId = (AstOperand)operation.GetSource(0);
|
|
||||||
|
|
||||||
Debug.Assert(funcId.Type == OperandType.Constant);
|
|
||||||
|
|
||||||
return context.GetFunction(funcId.Value).ReturnType;
|
|
||||||
}
|
|
||||||
else if (operation.Inst == Instruction.VectorExtract)
|
|
||||||
{
|
|
||||||
return GetNodeDestType(context, operation.GetSource(0)) & ~AggregateType.ElementCountMask;
|
|
||||||
}
|
|
||||||
else if (operation is AstTextureOperation texOp)
|
|
||||||
{
|
|
||||||
if (texOp.Inst == Instruction.ImageLoad ||
|
|
||||||
texOp.Inst == Instruction.ImageStore ||
|
|
||||||
texOp.Inst == Instruction.ImageAtomic)
|
|
||||||
{
|
|
||||||
return texOp.GetVectorType(texOp.Format.GetComponentType());
|
|
||||||
}
|
|
||||||
else if (texOp.Inst == Instruction.TextureSample)
|
|
||||||
{
|
|
||||||
return texOp.GetVectorType(GetDestVarType(operation.Inst));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetDestVarType(operation.Inst);
|
|
||||||
}
|
|
||||||
else if (node is AstOperand operand)
|
|
||||||
{
|
|
||||||
if (operand.Type == OperandType.Argument)
|
|
||||||
{
|
|
||||||
int argIndex = operand.Value;
|
|
||||||
|
|
||||||
return context.CurrentFunction.GetArgumentType(argIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetOperandVarType(context, operand, isAsgDest);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException($"Invalid node type \"{node?.GetType().Name ?? "null"}\".");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static AggregateType GetOperandVarType(CodeGenContext context, AstOperand operand, bool isAsgDest = false)
|
|
||||||
{
|
|
||||||
if (operand.Type == OperandType.Attribute)
|
|
||||||
{
|
|
||||||
if (_builtInAttributes.TryGetValue(operand.Value & ~3, out BuiltInAttribute builtInAttr))
|
|
||||||
{
|
|
||||||
return builtInAttr.Type;
|
|
||||||
}
|
|
||||||
else if (context.Config.Stage == ShaderStage.Vertex && !isAsgDest &&
|
|
||||||
operand.Value >= AttributeConsts.UserAttributeBase &&
|
|
||||||
operand.Value < AttributeConsts.UserAttributeEnd)
|
|
||||||
{
|
|
||||||
int location = (operand.Value - AttributeConsts.UserAttributeBase) / 16;
|
|
||||||
|
|
||||||
AttributeType type = context.Config.GpuAccessor.QueryAttributeType(location);
|
|
||||||
|
|
||||||
return type.ToAggregateType();
|
|
||||||
}
|
|
||||||
else if (context.Config.Stage == ShaderStage.Fragment && isAsgDest &&
|
|
||||||
operand.Value >= AttributeConsts.FragmentOutputColorBase &&
|
|
||||||
operand.Value < AttributeConsts.FragmentOutputColorEnd)
|
|
||||||
{
|
|
||||||
int location = (operand.Value - AttributeConsts.FragmentOutputColorBase) / 16;
|
|
||||||
|
|
||||||
AttributeType type = context.Config.GpuAccessor.QueryFragmentOutputType(location);
|
|
||||||
|
|
||||||
return type.ToAggregateType();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return OperandInfo.GetVarType(operand);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|
||||||
{
|
|
||||||
enum OperandType
|
|
||||||
{
|
|
||||||
Argument,
|
|
||||||
Attribute,
|
|
||||||
AttributePerPatch,
|
|
||||||
Constant,
|
|
||||||
ConstantBuffer,
|
|
||||||
Label,
|
|
||||||
LocalVariable,
|
|
||||||
Register,
|
|
||||||
Undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
static class OperandTypeExtensions
|
|
||||||
{
|
|
||||||
public static bool IsAttribute(this OperandType type)
|
|
||||||
{
|
|
||||||
return type == OperandType.Attribute || type == OperandType.AttributePerPatch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.StructuredIr
|
|
||||||
{
|
|
||||||
readonly struct TransformFeedbackOutput
|
|
||||||
{
|
|
||||||
public readonly bool Valid;
|
|
||||||
public readonly int Buffer;
|
|
||||||
public readonly int Offset;
|
|
||||||
public readonly int Stride;
|
|
||||||
|
|
||||||
public TransformFeedbackOutput(int buffer, int offset, int stride)
|
|
||||||
{
|
|
||||||
Valid = true;
|
|
||||||
Buffer = buffer;
|
|
||||||
Offset = offset;
|
|
||||||
Stride = stride;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class StructuredProgramInfo
|
|
||||||
{
|
|
||||||
public List<StructuredFunction> Functions { get; }
|
|
||||||
|
|
||||||
public HashSet<int> Inputs { get; }
|
|
||||||
public HashSet<int> Outputs { get; }
|
|
||||||
public HashSet<int> InputsPerPatch { get; }
|
|
||||||
public HashSet<int> OutputsPerPatch { get; }
|
|
||||||
|
|
||||||
public HelperFunctionsMask HelperFunctionsMask { get; set; }
|
|
||||||
|
|
||||||
public TransformFeedbackOutput[] TransformFeedbackOutputs { get; }
|
|
||||||
|
|
||||||
public StructuredProgramInfo()
|
|
||||||
{
|
|
||||||
Functions = new List<StructuredFunction>();
|
|
||||||
|
|
||||||
Inputs = new HashSet<int>();
|
|
||||||
Outputs = new HashSet<int>();
|
|
||||||
InputsPerPatch = new HashSet<int>();
|
|
||||||
OutputsPerPatch = new HashSet<int>();
|
|
||||||
|
|
||||||
TransformFeedbackOutputs = new TransformFeedbackOutput[0xc0];
|
|
||||||
}
|
|
||||||
|
|
||||||
public TransformFeedbackOutput GetTransformFeedbackOutput(int attr)
|
|
||||||
{
|
|
||||||
int index = attr / 4;
|
|
||||||
return TransformFeedbackOutputs[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetTransformFeedbackOutputComponents(int attr)
|
|
||||||
{
|
|
||||||
int index = attr / 4;
|
|
||||||
int baseIndex = index & ~3;
|
|
||||||
|
|
||||||
int count = 1;
|
|
||||||
|
|
||||||
for (; count < 4; count++)
|
|
||||||
{
|
|
||||||
ref var prev = ref TransformFeedbackOutputs[baseIndex + count - 1];
|
|
||||||
ref var curr = ref TransformFeedbackOutputs[baseIndex + count];
|
|
||||||
|
|
||||||
int prevOffset = prev.Offset;
|
|
||||||
int currOffset = curr.Offset;
|
|
||||||
|
|
||||||
if (!prev.Valid || !curr.Valid || prevOffset + 4 != currOffset)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (baseIndex + count <= index)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,105 +0,0 @@
|
|||||||
namespace Ryujinx.Graphics.Shader.Translation
|
|
||||||
{
|
|
||||||
static class AttributeConsts
|
|
||||||
{
|
|
||||||
public const int TessLevelOuter0 = 0x000;
|
|
||||||
public const int TessLevelOuter1 = 0x004;
|
|
||||||
public const int TessLevelOuter2 = 0x008;
|
|
||||||
public const int TessLevelOuter3 = 0x00c;
|
|
||||||
public const int TessLevelInner0 = 0x010;
|
|
||||||
public const int TessLevelInner1 = 0x014;
|
|
||||||
public const int PrimitiveId = 0x060;
|
|
||||||
public const int Layer = 0x064;
|
|
||||||
public const int ViewportIndex = 0x068;
|
|
||||||
public const int PointSize = 0x06c;
|
|
||||||
public const int PositionX = 0x070;
|
|
||||||
public const int PositionY = 0x074;
|
|
||||||
public const int PositionZ = 0x078;
|
|
||||||
public const int PositionW = 0x07c;
|
|
||||||
public const int FrontColorDiffuseR = 0x280;
|
|
||||||
public const int FrontColorDiffuseG = 0x284;
|
|
||||||
public const int FrontColorDiffuseB = 0x288;
|
|
||||||
public const int FrontColorDiffuseA = 0x28c;
|
|
||||||
public const int FrontColorSpecularR = 0x290;
|
|
||||||
public const int FrontColorSpecularG = 0x294;
|
|
||||||
public const int FrontColorSpecularB = 0x298;
|
|
||||||
public const int FrontColorSpecularA = 0x29c;
|
|
||||||
public const int BackColorDiffuseR = 0x2a0;
|
|
||||||
public const int BackColorDiffuseG = 0x2a4;
|
|
||||||
public const int BackColorDiffuseB = 0x2a8;
|
|
||||||
public const int BackColorDiffuseA = 0x2ac;
|
|
||||||
public const int BackColorSpecularR = 0x2b0;
|
|
||||||
public const int BackColorSpecularG = 0x2b4;
|
|
||||||
public const int BackColorSpecularB = 0x2b8;
|
|
||||||
public const int BackColorSpecularA = 0x2bc;
|
|
||||||
public const int ClipDistance0 = 0x2c0;
|
|
||||||
public const int ClipDistance1 = 0x2c4;
|
|
||||||
public const int ClipDistance2 = 0x2c8;
|
|
||||||
public const int ClipDistance3 = 0x2cc;
|
|
||||||
public const int ClipDistance4 = 0x2d0;
|
|
||||||
public const int ClipDistance5 = 0x2d4;
|
|
||||||
public const int ClipDistance6 = 0x2d8;
|
|
||||||
public const int ClipDistance7 = 0x2dc;
|
|
||||||
public const int PointCoordX = 0x2e0;
|
|
||||||
public const int PointCoordY = 0x2e4;
|
|
||||||
public const int TessCoordX = 0x2f0;
|
|
||||||
public const int TessCoordY = 0x2f4;
|
|
||||||
public const int InstanceId = 0x2f8;
|
|
||||||
public const int VertexId = 0x2fc;
|
|
||||||
public const int TexCoordCount = 10;
|
|
||||||
public const int TexCoordBase = 0x300;
|
|
||||||
public const int TexCoordEnd = TexCoordBase + TexCoordCount * 16;
|
|
||||||
public const int FrontFacing = 0x3fc;
|
|
||||||
|
|
||||||
public const int UserAttributesCount = 32;
|
|
||||||
public const int UserAttributeBase = 0x80;
|
|
||||||
public const int UserAttributeEnd = UserAttributeBase + UserAttributesCount * 16;
|
|
||||||
|
|
||||||
public const int UserAttributePerPatchBase = 0x18;
|
|
||||||
public const int UserAttributePerPatchEnd = 0x200;
|
|
||||||
|
|
||||||
public const int LoadOutputMask = 1 << 30;
|
|
||||||
public const int Mask = 0x3fffffff;
|
|
||||||
|
|
||||||
|
|
||||||
// Note: Those attributes are used internally by the translator
|
|
||||||
// only, they don't exist on Maxwell.
|
|
||||||
public const int SpecialMask = 0xf << 24;
|
|
||||||
public const int FragmentOutputDepth = 0x1000000;
|
|
||||||
public const int FragmentOutputColorBase = 0x1000010;
|
|
||||||
public const int FragmentOutputColorEnd = FragmentOutputColorBase + 8 * 16;
|
|
||||||
|
|
||||||
public const int FragmentOutputIsBgraBase = 0x1000100;
|
|
||||||
public const int FragmentOutputIsBgraEnd = FragmentOutputIsBgraBase + 8 * 4;
|
|
||||||
|
|
||||||
public const int SupportBlockViewInverseX = 0x1000200;
|
|
||||||
public const int SupportBlockViewInverseY = 0x1000204;
|
|
||||||
|
|
||||||
public const int ThreadIdX = 0x2000000;
|
|
||||||
public const int ThreadIdY = 0x2000004;
|
|
||||||
public const int ThreadIdZ = 0x2000008;
|
|
||||||
|
|
||||||
public const int CtaIdX = 0x2000010;
|
|
||||||
public const int CtaIdY = 0x2000014;
|
|
||||||
public const int CtaIdZ = 0x2000018;
|
|
||||||
|
|
||||||
public const int LaneId = 0x2000020;
|
|
||||||
|
|
||||||
public const int InvocationId = 0x2000024;
|
|
||||||
public const int PatchVerticesIn = 0x2000028;
|
|
||||||
|
|
||||||
public const int EqMask = 0x2000030;
|
|
||||||
public const int GeMask = 0x2000034;
|
|
||||||
public const int GtMask = 0x2000038;
|
|
||||||
public const int LeMask = 0x200003c;
|
|
||||||
public const int LtMask = 0x2000040;
|
|
||||||
|
|
||||||
public const int ThreadKill = 0x2000044;
|
|
||||||
|
|
||||||
public const int BaseInstance = 0x2000050;
|
|
||||||
public const int BaseVertex = 0x2000054;
|
|
||||||
public const int InstanceIndex = 0x2000058;
|
|
||||||
public const int VertexIndex = 0x200005c;
|
|
||||||
public const int DrawIndex = 0x2000060;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,210 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.Translation
|
|
||||||
{
|
|
||||||
readonly struct AttributeInfo
|
|
||||||
{
|
|
||||||
private static readonly Dictionary<int, AttributeInfo> _builtInAttributes = new Dictionary<int, AttributeInfo>()
|
|
||||||
{
|
|
||||||
{ AttributeConsts.Layer, new AttributeInfo(AttributeConsts.Layer, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.ViewportIndex, new AttributeInfo(AttributeConsts.ViewportIndex, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PointSize, new AttributeInfo(AttributeConsts.PointSize, 0, 1, AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionX, new AttributeInfo(AttributeConsts.PositionX, 0, 4, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionY, new AttributeInfo(AttributeConsts.PositionX, 1, 4, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionZ, new AttributeInfo(AttributeConsts.PositionX, 2, 4, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PositionW, new AttributeInfo(AttributeConsts.PositionX, 3, 4, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance0, new AttributeInfo(AttributeConsts.ClipDistance0, 0, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance1, new AttributeInfo(AttributeConsts.ClipDistance0, 1, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance2, new AttributeInfo(AttributeConsts.ClipDistance0, 2, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance3, new AttributeInfo(AttributeConsts.ClipDistance0, 3, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance4, new AttributeInfo(AttributeConsts.ClipDistance0, 4, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance5, new AttributeInfo(AttributeConsts.ClipDistance0, 5, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance6, new AttributeInfo(AttributeConsts.ClipDistance0, 6, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ClipDistance7, new AttributeInfo(AttributeConsts.ClipDistance0, 7, 8, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PointCoordX, new AttributeInfo(AttributeConsts.PointCoordX, 0, 2, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.PointCoordY, new AttributeInfo(AttributeConsts.PointCoordX, 1, 2, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessCoordX, new AttributeInfo(AttributeConsts.TessCoordX, 0, 3, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessCoordY, new AttributeInfo(AttributeConsts.TessCoordX, 1, 3, AggregateType.Vector4 | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.InstanceId, new AttributeInfo(AttributeConsts.InstanceId, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.VertexId, new AttributeInfo(AttributeConsts.VertexId, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.BaseInstance, new AttributeInfo(AttributeConsts.BaseInstance, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.BaseVertex, new AttributeInfo(AttributeConsts.BaseVertex, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.InstanceIndex, new AttributeInfo(AttributeConsts.InstanceIndex, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.VertexIndex, new AttributeInfo(AttributeConsts.VertexIndex, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.DrawIndex, new AttributeInfo(AttributeConsts.DrawIndex, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.FrontFacing, new AttributeInfo(AttributeConsts.FrontFacing, 0, 1, AggregateType.Bool) },
|
|
||||||
|
|
||||||
// Special.
|
|
||||||
{ AttributeConsts.FragmentOutputDepth, new AttributeInfo(AttributeConsts.FragmentOutputDepth, 0, 1, AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.ThreadKill, new AttributeInfo(AttributeConsts.ThreadKill, 0, 1, AggregateType.Bool) },
|
|
||||||
{ AttributeConsts.ThreadIdX, new AttributeInfo(AttributeConsts.ThreadIdX, 0, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.ThreadIdY, new AttributeInfo(AttributeConsts.ThreadIdX, 1, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.ThreadIdZ, new AttributeInfo(AttributeConsts.ThreadIdX, 2, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdX, new AttributeInfo(AttributeConsts.CtaIdX, 0, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdY, new AttributeInfo(AttributeConsts.CtaIdX, 1, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.CtaIdZ, new AttributeInfo(AttributeConsts.CtaIdX, 2, 3, AggregateType.Vector3 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LaneId, new AttributeInfo(AttributeConsts.LaneId, 0, 1, AggregateType.U32) },
|
|
||||||
{ AttributeConsts.InvocationId, new AttributeInfo(AttributeConsts.InvocationId, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PrimitiveId, new AttributeInfo(AttributeConsts.PrimitiveId, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.PatchVerticesIn, new AttributeInfo(AttributeConsts.PatchVerticesIn, 0, 1, AggregateType.S32) },
|
|
||||||
{ AttributeConsts.EqMask, new AttributeInfo(AttributeConsts.EqMask, 0, 4, AggregateType.Vector4 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.GeMask, new AttributeInfo(AttributeConsts.GeMask, 0, 4, AggregateType.Vector4 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.GtMask, new AttributeInfo(AttributeConsts.GtMask, 0, 4, AggregateType.Vector4 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LeMask, new AttributeInfo(AttributeConsts.LeMask, 0, 4, AggregateType.Vector4 | AggregateType.U32) },
|
|
||||||
{ AttributeConsts.LtMask, new AttributeInfo(AttributeConsts.LtMask, 0, 4, AggregateType.Vector4 | AggregateType.U32) },
|
|
||||||
};
|
|
||||||
|
|
||||||
private static readonly Dictionary<int, AttributeInfo> _builtInAttributesPerPatch = new Dictionary<int, AttributeInfo>()
|
|
||||||
{
|
|
||||||
{ AttributeConsts.TessLevelOuter0, new AttributeInfo(AttributeConsts.TessLevelOuter0, 0, 4, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessLevelOuter1, new AttributeInfo(AttributeConsts.TessLevelOuter0, 1, 4, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessLevelOuter2, new AttributeInfo(AttributeConsts.TessLevelOuter0, 2, 4, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessLevelOuter3, new AttributeInfo(AttributeConsts.TessLevelOuter0, 3, 4, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessLevelInner0, new AttributeInfo(AttributeConsts.TessLevelInner0, 0, 2, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
{ AttributeConsts.TessLevelInner1, new AttributeInfo(AttributeConsts.TessLevelInner0, 1, 2, AggregateType.Array | AggregateType.FP32) },
|
|
||||||
};
|
|
||||||
|
|
||||||
public int BaseValue { get; }
|
|
||||||
public int Value { get; }
|
|
||||||
public int Length { get; }
|
|
||||||
public AggregateType Type { get; }
|
|
||||||
public bool IsBuiltin { get; }
|
|
||||||
public bool IsValid => Type != AggregateType.Invalid;
|
|
||||||
|
|
||||||
public AttributeInfo(int baseValue, int index, int length, AggregateType type, bool isBuiltin = true)
|
|
||||||
{
|
|
||||||
BaseValue = baseValue;
|
|
||||||
Value = baseValue + index * 4;
|
|
||||||
Length = length;
|
|
||||||
Type = type;
|
|
||||||
IsBuiltin = isBuiltin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetInnermostIndex()
|
|
||||||
{
|
|
||||||
return (Value - BaseValue) / 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool Validate(ShaderConfig config, int value, bool isOutAttr, bool perPatch)
|
|
||||||
{
|
|
||||||
return perPatch ? ValidatePerPatch(config, value, isOutAttr) : Validate(config, value, isOutAttr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool Validate(ShaderConfig config, int value, bool isOutAttr)
|
|
||||||
{
|
|
||||||
if (value == AttributeConsts.ViewportIndex && !config.GpuAccessor.QueryHostSupportsViewportIndex())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return From(config, value, isOutAttr).IsValid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ValidatePerPatch(ShaderConfig config, int value, bool isOutAttr)
|
|
||||||
{
|
|
||||||
return FromPatch(config, value, isOutAttr).IsValid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AttributeInfo From(ShaderConfig config, int value, bool isOutAttr)
|
|
||||||
{
|
|
||||||
value &= ~3;
|
|
||||||
|
|
||||||
if (value >= AttributeConsts.UserAttributeBase && value < AttributeConsts.UserAttributeEnd)
|
|
||||||
{
|
|
||||||
int location = (value - AttributeConsts.UserAttributeBase) / 16;
|
|
||||||
|
|
||||||
AggregateType elemType;
|
|
||||||
|
|
||||||
if (config.Stage == ShaderStage.Vertex && !isOutAttr)
|
|
||||||
{
|
|
||||||
elemType = config.GpuAccessor.QueryAttributeType(location).ToAggregateType();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
elemType = AggregateType.FP32;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AttributeInfo(value & ~0xf, (value >> 2) & 3, 4, AggregateType.Vector4 | elemType, false);
|
|
||||||
}
|
|
||||||
else if (value >= AttributeConsts.FragmentOutputColorBase && value < AttributeConsts.FragmentOutputColorEnd)
|
|
||||||
{
|
|
||||||
int location = (value - AttributeConsts.FragmentOutputColorBase) / 16;
|
|
||||||
var elemType = config.GpuAccessor.QueryFragmentOutputType(location) switch
|
|
||||||
{
|
|
||||||
AttributeType.Sint => AggregateType.S32,
|
|
||||||
AttributeType.Uint => AggregateType.U32,
|
|
||||||
_ => AggregateType.FP32
|
|
||||||
};
|
|
||||||
|
|
||||||
return new AttributeInfo(value & ~0xf, (value >> 2) & 3, 4, AggregateType.Vector4 | elemType, false);
|
|
||||||
}
|
|
||||||
else if (value == AttributeConsts.SupportBlockViewInverseX || value == AttributeConsts.SupportBlockViewInverseY)
|
|
||||||
{
|
|
||||||
return new AttributeInfo(value, 0, 1, AggregateType.FP32);
|
|
||||||
}
|
|
||||||
else if (_builtInAttributes.TryGetValue(value, out AttributeInfo info))
|
|
||||||
{
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AttributeInfo(value, 0, 0, AggregateType.Invalid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AttributeInfo FromPatch(ShaderConfig config, int value, bool isOutAttr)
|
|
||||||
{
|
|
||||||
value &= ~3;
|
|
||||||
|
|
||||||
if (value >= AttributeConsts.UserAttributePerPatchBase && value < AttributeConsts.UserAttributePerPatchEnd)
|
|
||||||
{
|
|
||||||
int offset = (value - AttributeConsts.UserAttributePerPatchBase) & 0xf;
|
|
||||||
return new AttributeInfo(value - offset, offset >> 2, 4, AggregateType.Vector4 | AggregateType.FP32, false);
|
|
||||||
}
|
|
||||||
else if (_builtInAttributesPerPatch.TryGetValue(value, out AttributeInfo info))
|
|
||||||
{
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AttributeInfo(value, 0, 0, AggregateType.Invalid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsArrayBuiltIn(int attr)
|
|
||||||
{
|
|
||||||
if (attr <= AttributeConsts.TessLevelInner1 ||
|
|
||||||
attr == AttributeConsts.TessCoordX ||
|
|
||||||
attr == AttributeConsts.TessCoordY)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (attr & AttributeConsts.SpecialMask) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsArrayAttributeGlsl(ShaderStage stage, bool isOutAttr)
|
|
||||||
{
|
|
||||||
if (isOutAttr)
|
|
||||||
{
|
|
||||||
return stage == ShaderStage.TessellationControl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return stage == ShaderStage.TessellationControl ||
|
|
||||||
stage == ShaderStage.TessellationEvaluation ||
|
|
||||||
stage == ShaderStage.Geometry;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsArrayAttributeSpirv(ShaderStage stage, bool isOutAttr)
|
|
||||||
{
|
|
||||||
if (isOutAttr)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return stage == ShaderStage.TessellationControl ||
|
|
||||||
stage == ShaderStage.TessellationEvaluation ||
|
|
||||||
stage == ShaderStage.Geometry;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
namespace Ryujinx.HLE.HOS.Ipc
|
|
||||||
{
|
|
||||||
enum IpcMessageType
|
|
||||||
{
|
|
||||||
HipcResponse = 0,
|
|
||||||
HipcCloseSession = 2,
|
|
||||||
HipcRequest = 4,
|
|
||||||
HipcControl = 5,
|
|
||||||
HipcRequestWithContext = 6,
|
|
||||||
HipcControlWithContext = 7,
|
|
||||||
TipcCloseSession = 0xF
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Ryujinx.Headless.SDL2
|
|
||||||
{
|
|
||||||
public enum HideCursor
|
|
||||||
{
|
|
||||||
Never,
|
|
||||||
OnIdle,
|
|
||||||
Always
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
using LibHac.Common;
|
|
||||||
using LibHac.Ns;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ui.App.Common
|
|
||||||
{
|
|
||||||
public class ApplicationData
|
|
||||||
{
|
|
||||||
public bool Favorite { get; set; }
|
|
||||||
public byte[] Icon { get; set; }
|
|
||||||
public string TitleName { get; set; }
|
|
||||||
public string TitleId { get; set; }
|
|
||||||
public string Developer { get; set; }
|
|
||||||
public string Version { get; set; }
|
|
||||||
public string TimePlayed { get; set; }
|
|
||||||
public double TimePlayedNum { get; set; }
|
|
||||||
public string LastPlayed { get; set; }
|
|
||||||
public string FileExtension { get; set; }
|
|
||||||
public string FileSize { get; set; }
|
|
||||||
public double FileSizeBytes { get; set; }
|
|
||||||
public string Path { get; set; }
|
|
||||||
public BlitStruct<ApplicationControlProperty> ControlHolder { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
78
Ryujinx.sln
78
Ryujinx.sln
@ -3,33 +3,33 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.1.32228.430
|
VisualStudioVersion = 17.1.32228.430
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx", "Ryujinx\Ryujinx.csproj", "{074045D4-3ED2-4711-9169-E385F2BFB5A0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx", "src\Ryujinx\Ryujinx.csproj", "{074045D4-3ED2-4711-9169-E385F2BFB5A0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Tests", "Ryujinx.Tests\Ryujinx.Tests.csproj", "{EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Tests", "src\Ryujinx.Tests\Ryujinx.Tests.csproj", "{EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Tests.Unicorn", "Ryujinx.Tests.Unicorn\Ryujinx.Tests.Unicorn.csproj", "{D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Tests.Unicorn", "src\Ryujinx.Tests.Unicorn\Ryujinx.Tests.Unicorn.csproj", "{D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.HLE", "Ryujinx.HLE\Ryujinx.HLE.csproj", "{CB92CFF9-1D62-4D4F-9E88-8130EF61E351}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.HLE", "src\Ryujinx.HLE\Ryujinx.HLE.csproj", "{CB92CFF9-1D62-4D4F-9E88-8130EF61E351}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.ShaderTools", "Ryujinx.ShaderTools\Ryujinx.ShaderTools.csproj", "{3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.ShaderTools", "src\Ryujinx.ShaderTools\Ryujinx.ShaderTools.csproj", "{3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Common", "Ryujinx.Common\Ryujinx.Common.csproj", "{5FD4E4F6-8928-4B3C-BE07-28A675C17226}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Common", "src\Ryujinx.Common\Ryujinx.Common.csproj", "{5FD4E4F6-8928-4B3C-BE07-28A675C17226}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ARMeilleure", "ARMeilleure\ARMeilleure.csproj", "{ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ARMeilleure", "src\ARMeilleure\ARMeilleure.csproj", "{ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Gpu", "Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj", "{ADA7EA87-0D63-4D97-9433-922A2124401F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Gpu", "src\Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj", "{ADA7EA87-0D63-4D97-9433-922A2124401F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.GAL", "Ryujinx.Graphics.GAL\Ryujinx.Graphics.GAL.csproj", "{A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.GAL", "src\Ryujinx.Graphics.GAL\Ryujinx.Graphics.GAL.csproj", "{A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.OpenGL", "Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj", "{9558FB96-075D-4219-8FFF-401979DC0B69}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.OpenGL", "src\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj", "{9558FB96-075D-4219-8FFF-401979DC0B69}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Texture", "Ryujinx.Graphics.Texture\Ryujinx.Graphics.Texture.csproj", "{E1B1AD28-289D-47B7-A106-326972240207}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Texture", "src\Ryujinx.Graphics.Texture\Ryujinx.Graphics.Texture.csproj", "{E1B1AD28-289D-47B7-A106-326972240207}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Shader", "Ryujinx.Graphics.Shader\Ryujinx.Graphics.Shader.csproj", "{03B955CD-AD84-4B93-AAA7-BF17923BBAA5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Shader", "src\Ryujinx.Graphics.Shader\Ryujinx.Graphics.Shader.csproj", "{03B955CD-AD84-4B93-AAA7-BF17923BBAA5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec", "Ryujinx.Graphics.Nvdec\Ryujinx.Graphics.Nvdec.csproj", "{85A0FA56-DC01-4A42-8808-70DAC76BD66D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec", "src\Ryujinx.Graphics.Nvdec\Ryujinx.Graphics.Nvdec.csproj", "{85A0FA56-DC01-4A42-8808-70DAC76BD66D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio", "Ryujinx.Audio\Ryujinx.Audio.csproj", "{806ACF6D-90B0-45D0-A1AC-5F220F3B3985}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio", "src\Ryujinx.Audio\Ryujinx.Audio.csproj", "{806ACF6D-90B0-45D0-A1AC-5F220F3B3985}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36F870C1-3E5F-485F-B426-F0645AF78751}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36F870C1-3E5F-485F-B426-F0645AF78751}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
@ -37,55 +37,55 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
Directory.Packages.props = Directory.Packages.props
|
Directory.Packages.props = Directory.Packages.props
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Memory", "Ryujinx.Memory\Ryujinx.Memory.csproj", "{A5E6C691-9E22-4263-8F40-42F002CE66BE}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Memory", "src\Ryujinx.Memory\Ryujinx.Memory.csproj", "{A5E6C691-9E22-4263-8F40-42F002CE66BE}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Memory.Tests", "Ryujinx.Memory.Tests\Ryujinx.Memory.Tests.csproj", "{D1CC5322-7325-4F6B-9625-194B30BE1296}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Memory.Tests", "src\Ryujinx.Tests.Memory\Ryujinx.Tests.Memory.csproj", "{D1CC5322-7325-4F6B-9625-194B30BE1296}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Cpu", "Ryujinx.Cpu\Ryujinx.Cpu.csproj", "{3DF35E3D-D844-4399-A9A1-A9E923264C17}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Cpu", "src\Ryujinx.Cpu\Ryujinx.Cpu.csproj", "{3DF35E3D-D844-4399-A9A1-A9E923264C17}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Device", "Ryujinx.Graphics.Device\Ryujinx.Graphics.Device.csproj", "{C3002C3C-7B09-4FE7-894A-372EDA22FC6E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Device", "src\Ryujinx.Graphics.Device\Ryujinx.Graphics.Device.csproj", "{C3002C3C-7B09-4FE7-894A-372EDA22FC6E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Host1x", "Ryujinx.Graphics.Host1x\Ryujinx.Graphics.Host1x.csproj", "{C35F1536-7DE5-4F9D-9604-B5B4E1561947}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Host1x", "src\Ryujinx.Graphics.Host1x\Ryujinx.Graphics.Host1x.csproj", "{C35F1536-7DE5-4F9D-9604-B5B4E1561947}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec.Vp9", "Ryujinx.Graphics.Nvdec.Vp9\Ryujinx.Graphics.Nvdec.Vp9.csproj", "{B9AECA11-E248-4886-A10B-81B631CAAF29}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec.Vp9", "src\Ryujinx.Graphics.Nvdec.Vp9\Ryujinx.Graphics.Nvdec.Vp9.csproj", "{B9AECA11-E248-4886-A10B-81B631CAAF29}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Vic", "Ryujinx.Graphics.Vic\Ryujinx.Graphics.Vic.csproj", "{81BB2C11-9408-4EA3-822E-42987AF54429}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Vic", "src\Ryujinx.Graphics.Vic\Ryujinx.Graphics.Vic.csproj", "{81BB2C11-9408-4EA3-822E-42987AF54429}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Video", "Ryujinx.Graphics.Video\Ryujinx.Graphics.Video.csproj", "{FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Video", "src\Ryujinx.Graphics.Video\Ryujinx.Graphics.Video.csproj", "{FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.OpenAL", "Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj", "{0BE11899-DF2D-4BDE-B9EE-2489E8D35E7D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.OpenAL", "src\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj", "{0BE11899-DF2D-4BDE-B9EE-2489E8D35E7D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.SoundIo", "Ryujinx.Audio.Backends.SoundIo\Ryujinx.Audio.Backends.SoundIo.csproj", "{716364DE-B988-41A6-BAB4-327964266ECC}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.SoundIo", "src\Ryujinx.Audio.Backends.SoundIo\Ryujinx.Audio.Backends.SoundIo.csproj", "{716364DE-B988-41A6-BAB4-327964266ECC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Input", "Ryujinx.Input\Ryujinx.Input.csproj", "{C16F112F-38C3-40BC-9F5F-4791112063D6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Input", "src\Ryujinx.Input\Ryujinx.Input.csproj", "{C16F112F-38C3-40BC-9F5F-4791112063D6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Input.SDL2", "Ryujinx.Input.SDL2\Ryujinx.Input.SDL2.csproj", "{DFAB6F2D-B9BF-4AFF-B22B-7684A328EBA3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Input.SDL2", "src\Ryujinx.Input.SDL2\Ryujinx.Input.SDL2.csproj", "{DFAB6F2D-B9BF-4AFF-B22B-7684A328EBA3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.SDL2.Common", "Ryujinx.SDL2.Common\Ryujinx.SDL2.Common.csproj", "{2D5D3A1D-5730-4648-B0AB-06C53CB910C0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.SDL2.Common", "src\Ryujinx.SDL2.Common\Ryujinx.SDL2.Common.csproj", "{2D5D3A1D-5730-4648-B0AB-06C53CB910C0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.SDL2", "Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj", "{D99A395A-8569-4DB0-B336-900647890052}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Backends.SDL2", "src\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj", "{D99A395A-8569-4DB0-B336-900647890052}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Headless.SDL2", "Ryujinx.Headless.SDL2\Ryujinx.Headless.SDL2.csproj", "{390DC343-5CB4-4C79-A5DD-E3ED235E4C49}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Headless.SDL2", "src\Ryujinx.Headless.SDL2\Ryujinx.Headless.SDL2.csproj", "{390DC343-5CB4-4C79-A5DD-E3ED235E4C49}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec.FFmpeg", "Ryujinx.Graphics.Nvdec.FFmpeg\Ryujinx.Graphics.Nvdec.FFmpeg.csproj", "{BEE1C184-C9A4-410B-8DFC-FB74D5C93AEB}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec.FFmpeg", "src\Ryujinx.Graphics.Nvdec.FFmpeg\Ryujinx.Graphics.Nvdec.FFmpeg.csproj", "{BEE1C184-C9A4-410B-8DFC-FB74D5C93AEB}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ava", "Ryujinx.Ava\Ryujinx.Ava.csproj", "{7C1B2721-13DA-4B62-B046-C626605ECCE6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ava", "src\Ryujinx.Ava\Ryujinx.Ava.csproj", "{7C1B2721-13DA-4B62-B046-C626605ECCE6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.Common", "Ryujinx.Ui.Common\Ryujinx.Ui.Common.csproj", "{BA161CA0-CD65-4E6E-B644-51C8D1E542DC}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.Common", "src\Ryujinx.Ui.Common\Ryujinx.Ui.Common.csproj", "{BA161CA0-CD65-4E6E-B644-51C8D1E542DC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Generators", "Ryujinx.Horizon.Generators\Ryujinx.Horizon.Generators.csproj", "{6AE2A5E8-4C5A-48B9-997B-E1455C0355C6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Generators", "src\Ryujinx.Horizon.Generators\Ryujinx.Horizon.Generators.csproj", "{6AE2A5E8-4C5A-48B9-997B-E1455C0355C6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Vulkan", "Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj", "{D4D09B08-D580-4D69-B886-C35D2853F6C8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Vulkan", "src\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj", "{D4D09B08-D580-4D69-B886-C35D2853F6C8}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spv.Generator", "Spv.Generator\Spv.Generator.csproj", "{2BCB3D7A-38C0-4FE7-8FDA-374C6AD56D0E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spv.Generator", "src\Spv.Generator\Spv.Generator.csproj", "{2BCB3D7A-38C0-4FE7-8FDA-374C6AD56D0E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.LocaleGenerator", "Ryujinx.Ui.LocaleGenerator\Ryujinx.Ui.LocaleGenerator.csproj", "{77D01AD9-2C98-478E-AE1D-8F7100738FB4}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.LocaleGenerator", "src\Ryujinx.Ui.LocaleGenerator\Ryujinx.Ui.LocaleGenerator.csproj", "{77D01AD9-2C98-478E-AE1D-8F7100738FB4}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Common", "Ryujinx.Horizon.Common\Ryujinx.Horizon.Common.csproj", "{77F96ECE-4952-42DB-A528-DED25572A573}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Common", "src\Ryujinx.Horizon.Common\Ryujinx.Horizon.Common.csproj", "{77F96ECE-4952-42DB-A528-DED25572A573}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon", "Ryujinx.Horizon\Ryujinx.Horizon.csproj", "{AF34127A-3A92-43E5-8496-14960A50B1F1}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon", "src\Ryujinx.Horizon\Ryujinx.Horizon.csproj", "{AF34127A-3A92-43E5-8496-14960A50B1F1}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Kernel.Generators", "Ryujinx.Horizon.Kernel.Generators\Ryujinx.Horizon.Kernel.Generators.csproj", "{7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Kernel.Generators", "src\Ryujinx.Horizon.Kernel.Generators\Ryujinx.Horizon.Kernel.Generators.csproj", "{7F55A45D-4E1D-4A36-ADD3-87F29A285AA2}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
SCRIPT_DIR=$(dirname $(realpath $0))
|
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
||||||
RYUJINX_BIN="Ryujinx"
|
RYUJINX_BIN="Ryujinx"
|
||||||
|
|
||||||
if [ -f "$SCRIPT_DIR/Ryujinx.Ava" ]; then
|
if [ -f "$SCRIPT_DIR/Ryujinx.Ava" ]; then
|
||||||
|
@ -41,12 +41,10 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NOTE: Currently require https://github.com/indygreg/apple-platform-rs/pull/44 to work on other OSes.
|
# cargo install apple-codesign
|
||||||
# cargo install --git "https://github.com/marysaka/apple-platform-rs" --branch "fix/adhoc-app-bundle" apple-codesign --bin "rcodesign"
|
|
||||||
echo "Usign rcodesign for ad-hoc signing"
|
echo "Usign rcodesign for ad-hoc signing"
|
||||||
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY"
|
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY"
|
||||||
else
|
else
|
||||||
echo "Usign codesign for ad-hoc signing"
|
echo "Usign codesign for ad-hoc signing"
|
||||||
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$APP_BUNDLE_DIRECTORY"
|
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$APP_BUNDLE_DIRECTORY"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -30,14 +30,14 @@ mkdir -p "$TEMP_DIRECTORY"
|
|||||||
DOTNET_COMMON_ARGS="-p:DebugType=embedded -p:Version=$VERSION -p:SourceRevisionId=$SOURCE_REVISION_ID --self-contained true"
|
DOTNET_COMMON_ARGS="-p:DebugType=embedded -p:Version=$VERSION -p:SourceRevisionId=$SOURCE_REVISION_ID --self-contained true"
|
||||||
|
|
||||||
dotnet restore
|
dotnet restore
|
||||||
dotnet build -c Release Ryujinx.Ava
|
dotnet build -c Release src/Ryujinx.Ava
|
||||||
dotnet publish -c Release -r osx-arm64 -o "$TEMP_DIRECTORY/publish_arm64" $DOTNET_COMMON_ARGS Ryujinx.Ava
|
dotnet publish -c Release -r osx-arm64 -o "$TEMP_DIRECTORY/publish_arm64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava
|
||||||
dotnet publish -c Release -r osx-x64 -o "$TEMP_DIRECTORY/publish_x64" $DOTNET_COMMON_ARGS Ryujinx.Ava
|
dotnet publish -c Release -r osx-x64 -o "$TEMP_DIRECTORY/publish_x64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava
|
||||||
|
|
||||||
# Get ride of the support library for ARMeilleur for x64 (that's only for arm64)
|
# Get rid of the support library for ARMeilleure for x64 (that's only for arm64)
|
||||||
rm -rf "$TEMP_DIRECTORY/publish_x64/libarmeilleure-jitsupport.dylib"
|
rm -rf "$TEMP_DIRECTORY/publish_x64/libarmeilleure-jitsupport.dylib"
|
||||||
|
|
||||||
# Get ride of libsoundio from arm64 builds as we don't have a arm64 variant
|
# Get rid of libsoundio from arm64 builds as we don't have a arm64 variant
|
||||||
# TODO: remove this once done
|
# TODO: remove this once done
|
||||||
rm -rf "$TEMP_DIRECTORY/publish_arm64/libsoundio.dylib"
|
rm -rf "$TEMP_DIRECTORY/publish_arm64/libsoundio.dylib"
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user