hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.43k stars 2.19k forks source link

Support glslang-12 #17153

Open amano-kenji opened 1 year ago

amano-kenji commented 1 year ago

Game or games this happens in

None

What area of the game / PPSSPP

$ ldd /usr/lib64/libretro/ppsspp_libretro.so
        libglslang.so.11 => not found

What should happen

libglslang.so.12 => /usr/lib64/libglslang.so.12

Or, should I find a way to use built-in glslang?

Logs

No response

Platform

libretro / Retroarch

Mobile phone model or graphics card

Not relevant

PPSSPP version affected

1.14.4

Last working version

No response

Graphics backend (3D API)

OpenGL / GLES

Checklist

hrydgard commented 1 year ago

I'm upgrading the dependency, should fix the problem I think.

amano-kenji commented 1 year ago

Until it is released, I want to use ext/glslang.

https://github.com/hrydgard/ppsspp/releases/download/v1.14.4/ppsspp-1.14.4.tar.xz contains ext/glslang, but my package script doesn't use it.

src_configure() {
    local mycmakeargs=(
        -DCMAKE_SKIP_RPATH=ON
        -DLIBRETRO=ON
        -DHEADLESS=false
        -DUSE_DISCORD=OFF
        -DUSE_MINIUPNPC=OFF
        -DUSE_SYSTEM_FFMPEG=ON
        -DUSE_SYSTEM_LIBZIP=ON
        -DUSE_SYSTEM_SNAPPY=ON
        -DUSING_QT_UI=OFF
        -DUSING_GLES2=$(usex gles2)
    )

    if use vulkan; then
        mycmakeargs+=( -DVULKAN=ON )
        if use gbm; then
            mycmakeargs+=( -DUSE_VULKAN_DISPLAY_KHR=ON )
        fi
        if use wayland; then
            mycmakeargs+=( -DUSE_WAYLAND_WSI=ON )
        fi
        mycmakeargs+=( -DUSING_X11_VULKAN=$(usex X) )
    fi

    cmake_src_configure
}

How can I make it use ext/glslang instead of system glslang?

hrydgard commented 1 year ago

I merged it already.

amano-kenji commented 1 year ago

The problem is that my package script for ppsspp-libretro builds ppsspp_libretro.so that depends on system glslang instead of using internal glslang.

If I just make it use internal glslang, I won't have to worry about glslang-13.

Is there anything that I can do to make it use internal glslang?

amano-kenji commented 1 year ago

Also, without the release tarball, I don't get git submodules.

Until I get a new release or find a way to use internal glslang, I don't have ppsspp on my system.

anr2me commented 1 year ago

Also, without the release tarball, I don't get git submodules.

How did you get PPSSPP source code? If you're using git clone, you will need --recurse-submodules to get all of those in ext folder, or do git submodule update --init --recursive (which may also need to be done whenever pulling the latest version).

amano-kenji commented 1 year ago

It seems I should just make my own release tarball out of the latest commit and upload it to my git repository. However, the issue of not being able to use internal glslang remains.

unknownbrackets commented 1 year ago

You're better off using git with a shallow clone. It will even verify the files to make sure integrity is good, and automatically too.

As to using a non-system glslang, I would assume your cmake command is passing -DBUILD_SHARED_LIBS=ON or something? It would not use system glslang anyway.

Also, the upgrade was reverted but I've reverted the revert in #17166.

-[Unknown]

amano-kenji commented 1 year ago

Does ppsspp-libretro work on wayland only with vulkan backend? Does GLES2 backend support wayland?

By the way, on gentoo linux, BUILD_SHARED_LIBS=ON is set for cmake packages. Thus, just passing -DBUILD_SHARED_LIBS=OFF to my package script was enough to use internal glslang.