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

ppsspp: fix build against ffmpeg 4.4 #123843

Merged
merged 2 commits into from
Jun 16, 2021

Conversation

lunik1
Copy link
Contributor

@lunik1 lunik1 commented May 20, 2021

Motivation for this change

Applying the same fix for compilation against ffmpeg 4.4 that I used for the libretro core in #123842.

I can't verify the resulting binary works. It crashes with an OpenGL error for me, but so does ppsspp on 20.09 so it's something on my end.

edit to ping the ppsspp maintainer: @AndersonTorres

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested a review from AndersonTorres May 20, 2021 23:18
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels May 20, 2021
@AndersonTorres
Copy link
Member

I will try to test this tomorrow

@AndersonTorres
Copy link
Member

20:19:484 Core/Config.cpp:1339 I[LOADER]: Config loaded: '/home/anderson/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
QObject::connect: No such slot MainWindow::frameSkippinGroup_triggered(QAction *)
20:20:125 Qt/QtMain.cpp:572 I[SYSTEM]: Initializing GL graphics context
20:20:125 OpenGL/GLFeatures.cpp:187 W[G3D]: Unknown GL vendor: 'X.Org'
20:20:125 OpenGL/GLFeatures.cpp:194 I[G3D]: GPU Vendor : X.Org ; renderer: AMD RAVEN (DRM 3.35.0, 5.4.100, LLVM 9.0.1) version str: 4.6 (Core Profile) Mesa 20.1.10 ; GLSL version str: 4.60
20:20:125 Qt/QtMain.cpp:574 I[SYSTEM]: Using thread, starting emu thread
20:20:125 OpenGL/GLRenderManager.cpp:133 I[G3D]: Updating inflight frames to 3
20:20:125 Core/Core.cpp:194 I[G3D]: pixel_res: 200x80. Calling NativeResized()
20:20:125 UI/NativeApp.cpp:1386 I[G3D]: NativeResized - setting flag
20:20:125 UI/NativeApp.cpp:836 I[SYSTEM]: NativeInitGraphics
20:20:127 UI/NativeApp.cpp:905 I[SYSTEM]: NativeInitGraphics completed
20:20:127 UI/DiscordIntegration.cpp:59 I[SYSTEM]: Discord connection initialized
20:20:172 Core/Core.cpp:194 I[G3D]: pixel_res: 960x544. Calling NativeResized()
20:20:172 UI/NativeApp.cpp:1386 I[G3D]: NativeResized - setting flag
20:20:172 UI/NativeApp.cpp:399 E[LOADER]: Failed graphics backends: OPENGL,ALL,ALL,ALL
20:20:172 Core/Config.cpp:624 E[LOADER]: Graphics backend failed for 0, trying another
20:20:172 Core/Config.cpp:649 E[LOADER]: All graphics backends failed
20:20:182 Core/Config.cpp:1420 I[LOADER]: Config saved (got storage permission): '/home/anderson/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
20:20:183 Core/Config.cpp:1433 I[LOADER]: Controller config saved: /home/anderson/.config/ppsspp/PSP/SYSTEM/controls.ini
20:20:229 UI/NativeApp.cpp:1112 I[G3D]: Resized flag set - recalculating bounds
20:20:229 UI/Screen.cpp:132 I[SYSTEM]: ScreenManager::resized(dp: 1707x967)
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  98
  Current serial number in output stream:  98
20:20:583 UI/DiscordIntegration.cpp:43 E[SYSTEM]: Discord destructor running though g_Discord.Shutdown() has not been called.

@AndersonTorres
Copy link
Member

Maybe because I am using Wayfire?

@lunik1
Copy link
Contributor Author

lunik1 commented May 21, 2021

Could be, I had a similar issue on sway. Does installing ppsspp from 20.09 work for you?

@AndersonTorres
Copy link
Member

Rigorously the same. No difference.

50:05:820 Core/Config.cpp:1306 I[LOADER]: Loading controller config: /home/anderson/.config/ppsspp/PSP/SYSTEM/controls.ini
50:05:821 Core/Config.cpp:1339 I[LOADER]: Config loaded: '/home/anderson/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
QObject::connect: No such slot MainWindow::frameSkippinGroup_triggered(QAction *)
50:06:056 Qt/QtMain.cpp:572 I[SYSTEM]: Initializing GL graphics context
50:06:056 OpenGL/GLFeatures.cpp:187 W[G3D]: Unknown GL vendor: 'X.Org'
50:06:056 OpenGL/GLFeatures.cpp:194 I[G3D]: GPU Vendor : X.Org ; renderer: AMD RAVEN (DRM 3.35.0, 5.4.100, LLVM 9.0.1) version str: 4.6 (Core Profile) Mesa 20.1.10 ; GLSL version str: 4.60
50:06:057 Qt/QtMain.cpp:574 I[SYSTEM]: Using thread, starting emu thread
50:06:057 OpenGL/GLRenderManager.cpp:133 I[G3D]: Updating inflight frames to 3
50:06:057 Core/Core.cpp:194 I[G3D]: pixel_res: 200x80. Calling NativeResized()
50:06:057 UI/NativeApp.cpp:1386 I[G3D]: NativeResized - setting flag
50:06:057 UI/NativeApp.cpp:836 I[SYSTEM]: NativeInitGraphics
50:06:059 UI/NativeApp.cpp:905 I[SYSTEM]: NativeInitGraphics completed
50:06:059 UI/DiscordIntegration.cpp:59 I[SYSTEM]: Discord connection initialized
50:06:063 Core/Core.cpp:194 I[G3D]: pixel_res: 960x544. Calling NativeResized()
50:06:063 UI/NativeApp.cpp:1386 I[G3D]: NativeResized - setting flag
50:06:064 UI/NativeApp.cpp:399 E[LOADER]: Failed graphics backends: OPENGL,ALL,ALL,ALL,ALL,ALL,ALL
50:06:064 Core/Config.cpp:624 E[LOADER]: Graphics backend failed for 0, trying another
50:06:064 Core/Config.cpp:649 E[LOADER]: All graphics backends failed
50:06:075 Core/Config.cpp:1420 I[LOADER]: Config saved (got storage permission): '/home/anderson/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
50:06:076 Core/Config.cpp:1433 I[LOADER]: Controller config saved: /home/anderson/.config/ppsspp/PSP/SYSTEM/controls.ini
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  98
  Current serial number in output stream:  98
50:06:125 UI/DiscordIntegration.cpp:43 E[SYSTEM]: Discord destructor running though g_Discord.Shutdown() has not been called.

@AndersonTorres
Copy link
Member

And the same occurs when I ran without patches/updates the stable version.

@lunik1
Copy link
Contributor Author

lunik1 commented May 22, 2021

Well at least this patch hasn't necessarily broken it 🙃. Getting late for me but I'll see if I can get ppsspp to run over the weekend.

@lunik1
Copy link
Contributor Author

lunik1 commented May 24, 2021

No luck so far on Wayland. I won't have much time to look at this this week, but I think the next step is to try on an X server. If that works we can verify this patch and merge this, and open a new issue for Wayland?

@AndersonTorres
Copy link
Member

YEP!

@lunik1
Copy link
Contributor Author

lunik1 commented Jun 1, 2021

Both ppsspp from 20.09 and this PR work for me when forcing XWayland with env -u WAYLAND_DISPLAY.

@Artturin
Copy link
Member

Artturin commented Jun 1, 2021

-DUSE_WAYLAND_WSI=ON is needed for wayland to work but hrydgard/ppsspp#13845
to run it with xwayland use the SLD_VIDEODRIVER=x11 env var

@lunik1
Copy link
Contributor Author

lunik1 commented Jun 16, 2021

Since it seems that the wayland issue is not caused by this patch, can it be merged? Compiling with wayland support can be addressed separately.

I think this will also need to be backported to 21.05.

@AndersonTorres AndersonTorres merged commit 78a6cf4 into NixOS:master Jun 16, 2021
@AndersonTorres
Copy link
Member

@lunik1 can you address the backport issue?

@lunik1
Copy link
Contributor Author

lunik1 commented Jun 16, 2021

I can, should this be squashed for the backport?

@AndersonTorres
Copy link
Member

Usually backports are made via cherry-pick.

@github-actions
Copy link
Contributor

Successfully created backport PR #127122 for release-21.05.

@lunik1 lunik1 deleted the ppsspp-ffmpeg-44-fix branch June 16, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants