Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Vulkan: Feedback loop detection and barriers (#7226)" #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KeatonTheBot
Copy link
Contributor

@KeatonTheBot KeatonTheBot commented Nov 17, 2024

This reverts commit ca59c3f.

Prevents slowdowns in Paper Mario: The Thousand Year Door, the Xenoblade games, and others. Feel free to test and let me know if you get speedups in games where it would normally slow down.

There are known issues with AMD RX 7000 (RDNA 3) cards, so a fix implementing barriers only on these cards would be an ideal solution.

@github-actions github-actions bot added gpu Affects GPU emulation graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations. labels Nov 17, 2024
@KeatonTheBot KeatonTheBot force-pushed the revert-vulkan-barriers branch from 570fdd4 to fd84e07 Compare November 20, 2024 02:28
@sunshineinabox
Copy link
Contributor

Thought I should add my two cents to this. This is not a good idea, it would be better to use performance and best practice layer to fix this.

@GreemDev
Copy link
Member

Thought I should add my two cents to this. This is not a good idea, it would be better to use performance and best practice layer to fix this.

There's a reason why I haven't merged it yet. We're figuring out a way to keep the behavior when it needs it.

@extherian
Copy link
Contributor

extherian commented Nov 22, 2024

Now that the sparse-jit PR has been merged, would you consider rebasing this PR on the latest Canary release? I didn't see any benefits from either sparse jit nor this Vulkan barrier revert before since I have a weak CPU, but I am curious to see if there will be benefits from having both of them at once.

@KeatonTheBot KeatonTheBot force-pushed the revert-vulkan-barriers branch from cb46ddf to e879a0c Compare November 22, 2024 23:32
@KeatonTheBot
Copy link
Contributor Author

Now that the sparse-jit PR has been merged, would you consider rebasing this PR on the latest Canary release? I didn't see any benefits from either sparse jit nor this Vulkan barrier revert before since I have a weak CPU, but I am curious to see if there will be benefits from having both of them at once.

Done.

@KeatonTheBot KeatonTheBot force-pushed the revert-vulkan-barriers branch from d781691 to 939fabe Compare November 26, 2024 20:17
@extherian
Copy link
Contributor

The City in Xenoblade went from 40 FPS on both the sparse jit build and barrier revert build individually, to 50 - 55 FPS when both are merged together in this pull request. I guess all that we need to finish it is some way of detecting RDNA3 GPUs to enable vulkan barrier detection for them specifically.

@KeatonTheBot KeatonTheBot force-pushed the revert-vulkan-barriers branch 2 times, most recently from f702cf2 to c52c978 Compare December 5, 2024 23:27
@DiamondBond
Copy link

DiamondBond commented Dec 8, 2024

Improves performance by 5 FPS or so and stutters are less severe & frequent in the worst case scenarios in DQ3 HD2D.

CPU: AMD Ryzen 9 7900X
GPU: NVIDIA GeForce RTX 3060
RAM: 32GB

Modified AUR PKGBUILD for ryujinx-git to source from this branch
# Maintainer: username227 < gfrank227 [at] gmail [dot] com >
# Contributor: HurricanePootis <hurricanepootis@protonmail.com>
# Contributor: Marco Rubin <marco.rubin@protonmail.com>

## options
if [ -z "$_srcinfo" ] && [ -z "$_pkgver" ]; then
  : ${_autoupdate:=true}
fi

: ${_install_path:=usr/lib}

## basic info
_pkgname="ryujinx-git"
pkgname="$_pkgname"
pkgver=r3636.1d0152b96
pkgrel=3
pkgdesc="Experimental Nintendo Switch Emulator written in C#"
url="https://github.com/KeatonTheBot/Ryujinx-Greem"
license=('MIT')
arch=('x86_64')

depends=(
  'gcc-libs'
  'zlib'
  'dotnet-runtime-8.0-bin'
)
makedepends=(
  'desktop-file-utils'
  'dotnet-sdk-bin'
  'git'
)

options=('!strip' '!debug')

_source_ryujinx() {
  _pkgsrc="Ryujinx-Greem"
  _pkgext="tar.gz"
  source=("git+https://github.com/KeatonTheBot/Ryujinx-Greem.git#branch=revert-vulkan-barriers")
  sha256sums=('SKIP')
}

pkgver() {
  cd "$srcdir/$_pkgsrc"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() (
  export HOME="$SRCDEST/nuget-home"
  export DOTNET_CLI_TELEMETRY_OPTOUT=1

  local _args=(
    -c Release
    -p:DebugType=none
    -o build
  )
  dotnet build "${_args[@]}" "$_pkgsrc/src/Ryujinx"

  echo "Shutting down dotnet build server in background."
  (timeout -k 45 30 dotnet build-server shutdown) > /dev/null 2>&1 &
)

package() {
  # program
  install -dm755 "$pkgdir/$_install_path/ryujinx"
  install -dm755 "$pkgdir/$_install_path/Ryujinx.Headless.SDL2"
  cp -a --update=none --reflink=auto "$srcdir/build/"* "$pkgdir/$_install_path/ryujinx/"

  # symlinks
  install -dm755 "$pkgdir/usr/bin"
  ln -s "/$_install_path/ryujinx/Ryujinx" "$pkgdir/usr/bin/ryujinx"

  # .desktop
  install -Dm644 "$_pkgsrc/distribution/linux/Ryujinx.desktop" "$pkgdir/usr/share/applications/ryujinx.desktop"

  # icon
  install -Dm644 "$_pkgsrc/distribution/misc/Logo.svg" "$pkgdir/usr/share/pixmaps/ryujinx.svg"

  # mimetype
  install -Dm644 "$_pkgsrc/distribution/linux/mime/Ryujinx.xml" "$pkgdir/usr/share/mime/packages/ryujinx.xml"

  # license
  install -Dm644 "$_pkgsrc/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # fix permissions
  find "$pkgdir" -type d -exec chmod 755 {} \;
  find "$pkgdir" -type f -exec chmod 644 {} \;
  chmod 755 "$pkgdir/$_install_path/ryujinx/Ryujinx"
  chmod 755 "$pkgdir/$_install_path/ryujinx/Ryujinx.sh"

  # fix desktop file
  desktop-file-edit --set-key="Exec" --set-value="ryujinx %f" "$pkgdir/usr/share/applications/ryujinx.desktop"
  desktop-file-edit --set-icon="ryujinx" "$pkgdir/usr/share/applications/ryujinx.desktop"
}

_source_ryujinx

@KeatonTheBot
Copy link
Contributor Author

PR now includes migration to .NET 9.

@KeatonTheBot KeatonTheBot force-pushed the revert-vulkan-barriers branch from 9479298 to be015c6 Compare December 26, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu Affects GPU emulation graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants