diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index c8ce389..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build lsfg-vk - -on: - push: - branches: ["release"] - -jobs: - build: - runs-on: ubuntu-latest - steps: - # prepare system - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install build dependencies - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: git wget xvfb - clang clang-tools llvm rustup - cmake ninja-build pkg-config - libdecor-0-0 libvulkan-dev - libgtk-4-dev libadwaita-1-dev - version: 1.0 - execute_install_scripts: true - - name: Install rust dependency - run: | - rustup default stable - # build the project - - name: Configure with CMake and Ninja - run: | - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=./target \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On - - name: Build with Ninja - run: | - ninja -C build - - name: Install with CMake - run: | - cmake --install build --strip - - name: Build lsfg-vk-ui - run: | - pushd ui - chmod +x ./build_appimage.sh - ./build_appimage.sh - popd - - name: Install lsfg-vk-ui - run: | - mkdir -p target/{bin,share/applications,share/icons/hicolor/256x256/apps} - mv ui/lsfg-vk-ui.AppImage target/bin/lsfg-vk-ui - cp ui/rsc/gay.pancake.lsfg-vk-ui.desktop target/share/applications/lsfg-vk-ui.desktop - cp ui/rsc/icon.png target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - # upload all files - - name: Upload lsfg-vk artifact - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/share/applications/lsfg-vk-ui.desktop - target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - target/lib/liblsfg-vk.so - target/bin/lsfg-vk-ui - - name: Upload lsfg-vk artifact (without UI) - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk_noui - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/lib/liblsfg-vk.so diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml deleted file mode 100644 index 783d93b..0000000 --- a/.github/workflows/build_ci.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: (CI) Build lsfg-vk - -on: - push: - branches: ["develop"] - -jobs: - build: - runs-on: ubuntu-latest - steps: - # prepare system - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install build dependencies - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: git wget xvfb - clang clang-tools llvm rustup - cmake ninja-build pkg-config - libdecor-0-0 libvulkan-dev - libgtk-4-dev libadwaita-1-dev - version: 1.0 - execute_install_scripts: true - - name: Install rust dependency - run: | - rustup default stable - # build the project - - name: Configure with CMake and Ninja - run: | - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=./target \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On - - name: Build with Ninja - run: | - ninja -C build - - name: Install with CMake - run: | - cmake --install build --strip - - name: Build lsfg-vk-ui - run: | - pushd ui - chmod +x ./build_appimage.sh - ./build_appimage.sh - popd - - name: Install lsfg-vk-ui - run: | - mkdir -p target/{bin,share/applications,share/icons/hicolor/256x256/apps} - mv ui/lsfg-vk-ui.AppImage target/bin/lsfg-vk-ui - cp ui/rsc/gay.pancake.lsfg-vk-ui.desktop target/share/applications/lsfg-vk-ui.desktop - cp ui/rsc/icon.png target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - # upload all files - - name: Upload lsfg-vk artifact - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/share/applications/lsfg-vk-ui.desktop - target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - target/lib/liblsfg-vk.so - target/bin/lsfg-vk-ui - - name: Upload lsfg-vk artifact (without UI) - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk_noui - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/lib/liblsfg-vk.so diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1356714 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: (CI) lsfg-vk + +on: + push: + branches: ["release", "develop"] + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + # Install build dependencies & Update Vulkan headers + - name: Install build dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: + git curl + llvm clang clang-tools clang-tidy + cmake ninja-build pkg-config + libvulkan-dev + mesa-common-dev + qt6-base-dev qt6-base-dev-tools + qt6-tools-dev qt6-tools-dev-tools + qt6-declarative-dev qt6-declarative-dev-tools + version: 2.0 + - name: Update Vulkan headers + run: | + git clone -b vulkan-sdk-1.4.328 https://github.com/KhronosGroup/Vulkan-Headers /tmp/vkh + sudo rm -rf /usr/include/{vulkan,vk_video} + sudo mv /tmp/vkh/include/{vulkan,vk_video} /usr/include/ + rm -rf /tmp/vkh + # Configure and build lsfg-vk + - name: Configure lsfg-vk + run: | + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=./target \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DLSFGVK_BUILD_VULKAN_LAYER=On \ + -DLSFGVK_BUILD_USER_INTERFACE=On \ + -DLSFGVK_INSTALL_XDG_FILES=On + - name: Build with Ninja + run: | + ninja -C build + - name: Install with CMake + run: | + cmake --install build + # Compress lsfg-vk into an artifact + - name: Upload lsfg-vk artifact + uses: actions/upload-artifact@v4 + with: + name: lsfg-vk + path: | + target/* diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 407af33..1e19fbc 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -1,8 +1,8 @@ -name: Build lsfg-vk for Flatpak +name: (CI/Flatpak) lsfg-vk on: push: - branches: ["release"] + branches: ["release", "develop"] jobs: flatpak-extensions: @@ -20,13 +20,13 @@ jobs: uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: bundle: "org.freedesktop.Platform.VulkanLayer.lsfg_vk_${{ matrix.version }}.flatpak" - manifest-path: "flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_${{ matrix.version }}.yml" + manifest-path: "dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_${{ matrix.version }}.yml" branch: "${{ matrix.version }}" cache: false flatpak-ui: runs-on: ubuntu-latest container: - image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10 options: --privileged steps: - name: Checkout repository @@ -35,6 +35,6 @@ jobs: uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: bundle: "gay.pancake.lsfg-vk-ui.flatpak" - manifest-path: "flatpak/gay.pancake.lsfg-vk-ui.yml" - branch: "release" + manifest-path: "dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.yml" + branch: "${{ github.ref_name }}" cache: false diff --git a/.github/workflows/flatpak_ci.yml b/.github/workflows/flatpak_ci.yml deleted file mode 100644 index 2b1e9a8..0000000 --- a/.github/workflows/flatpak_ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: (CI) Build lsfg-vk for Flatpak - -on: - push: - branches: ["develop"] - -jobs: - flatpak-extensions: - runs-on: ubuntu-latest - strategy: - matrix: - version: ["23.08", "24.08", "25.08"] - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-${{ matrix.version }} - options: --privileged - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Build Flatpak extension (${{ matrix.version }}) - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 - with: - bundle: "org.freedesktop.Platform.VulkanLayer.lsfg_vk_${{ matrix.version }}.flatpak" - manifest-path: "flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_${{ matrix.version }}.yml" - branch: "${{ matrix.version }}" - cache: false - flatpak-ui: - runs-on: ubuntu-latest - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 - options: --privileged - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Build Flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 - with: - bundle: "gay.pancake.lsfg-vk-ui.flatpak" - manifest-path: "flatpak/gay.pancake.lsfg-vk-ui.yml" - branch: "develop" - cache: false diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..d310c72 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,87 @@ +name: (Manual) lsfg-vk + +on: + issue_comment: + types: ["created"] + +permissions: + pull-requests: write + +jobs: + build: + runs-on: ubuntu-22.04 + # Run if PancakeTAS commented '@action build' + # on a pull request + if: | + github.event.issue.pull_request && + github.event.comment.body == '@actions build' && + github.event.comment.user.login == 'PancakeTAS' + steps: + # Query GitHub API to find the branch on which the + # comment was left. Then check it out + - name: Find commit hash + id: prRef + run: | + echo "ref=$(gh pr view $PR_NUMBER --repo ${{ github.repository }} --json headRefName \ + | jq -r '.headRefName')" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.issue.number }} + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ steps.prRef.outputs.ref }} + fetch-depth: 0 + # Install build dependencies & Update Vulkan headers + - name: Install build dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: + git curl + llvm clang clang-tools clang-tidy + cmake ninja-build pkg-config + libvulkan-dev + mesa-common-dev + qt6-base-dev qt6-base-dev-tools + qt6-tools-dev qt6-tools-dev-tools + qt6-declarative-dev qt6-declarative-dev-tools + version: 2.0 + - name: Update Vulkan headers + run: | + git clone -b vulkan-sdk-1.4.328 https://github.com/KhronosGroup/Vulkan-Headers /tmp/vkh + sudo rm -rf /usr/include/{vulkan,vk_video} + sudo mv /tmp/vkh/include/{vulkan,vk_video} /usr/include/ + rm -rf /tmp/vkh + # Configure and build lsfg-vk + - name: Configure lsfg-vk + run: | + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=./target \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DLSFGVK_BUILD_VULKAN_LAYER=On \ + -DLSFGVK_BUILD_USER_INTERFACE=On \ + -DLSFGVK_INSTALL_XDG_FILES=On + - name: Build with Ninja + run: | + ninja -C build + - name: Install with CMake + run: | + cmake --install build + # Compress lsfg-vk into an artifact + - name: Upload lsfg-vk artifact + uses: actions/upload-artifact@v4 + with: + name: lsfg-vk + path: | + target/* + # Comment on pull request + - name: Comment on PR + uses: thollander/actions-comment-pull-request@v3 + with: + pr-number: ${{ github.event.issue.number }} + message: | + **Development Build** + + I have built this lsfg-vk pull request for you: + https://github.com/PancakeTAS/lsfg-vk/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml deleted file mode 100644 index 98ca28d..0000000 --- a/.github/workflows/package.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Package lsfg-vk -run-name: ${{ github.event.workflow_run.head_commit.message }} - -on: - workflow_run: - workflows: ["Build lsfg-vk"] - types: - - completed - -jobs: - package: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.workflow_run.head_sha }} - fetch-depth: 0 - - name: Download lsfg-vk artifacts - uses: actions/download-artifact@v4 - with: - name: lsfg-vk - path: . - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - - name: Package lsfg-vk for various distros - run: | - export VERSION=1.0.0 - chmod +x ./package/package.sh - ./package/package.sh - - name: Upload lsfg-vk for dpkg - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.dpkg - path: | - *.deb - - name: Upload lsfg-vk for rpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.rpm - path: | - *.rpm - - name: Upload lsfg-vk for alpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.alpm - path: | - *.zst diff --git a/.github/workflows/package_ci.yml b/.github/workflows/package_ci.yml deleted file mode 100644 index 50ec34c..0000000 --- a/.github/workflows/package_ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: (CI) Package lsfg-vk -run-name: ${{ github.event.workflow_run.head_commit.message }} - -on: - workflow_run: - workflows: ["(CI) Build lsfg-vk"] - types: - - completed - -jobs: - package: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.workflow_run.head_sha }} - fetch-depth: 0 - - name: Download lsfg-vk artifacts - uses: actions/download-artifact@v4 - with: - name: lsfg-vk - path: . - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - - name: Package lsfg-vk for various distros - run: | - chmod +x ./package/package.sh - ./package/package.sh - - name: Upload lsfg-vk for dpkg - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.dpkg - path: | - *.deb - - name: Upload lsfg-vk for rpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.rpm - path: | - *.rpm - - name: Upload lsfg-vk for alpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.alpm - path: | - *.zst diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d46b17e..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: (Manual) Build lsfg-vk - -on: - issue_comment: - types: ["created"] - -permissions: - pull-requests: write - -jobs: - build: - runs-on: ubuntu-latest - if: | - github.event.issue.pull_request && - github.event.comment.body == '@actions build' && - github.event.comment.user.login == 'PancakeTAS' - steps: - # prepare system - - name: Find commit hash - id: prRef - run: | - echo "ref=$(gh pr view $PR_NUMBER --repo ${{ github.repository }} --json headRefName \ - | jq -r '.headRefName')" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.issue.number }} - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ steps.prRef.outputs.ref }} - fetch-depth: 0 - - name: Install build dependencies - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: git wget xvfb - clang clang-tools llvm rustup - cmake ninja-build pkg-config - libdecor-0-0 libvulkan-dev - libgtk-4-dev libadwaita-1-dev - version: 1.0 - execute_install_scripts: true - - name: Install rust dependency - run: | - rustup default stable - # build the project - - name: Configure with CMake and Ninja - run: | - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=./target \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ - - name: Build with Ninja - run: | - ninja -C build - - name: Install with CMake - run: | - cmake --install build - - name: Build lsfg-vk-ui - run: | - pushd ui - chmod +x ./build_appimage.sh - ./build_appimage.sh - popd - - name: Install lsfg-vk-ui - run: | - mkdir -p target/{bin,share/applications,share/icons/hicolor/256x256/apps} - mv ui/lsfg-vk-ui.AppImage target/bin/lsfg-vk-ui - cp ui/rsc/gay.pancake.lsfg-vk-ui.desktop target/share/applications/lsfg-vk-ui.desktop - cp ui/rsc/icon.png target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - # create packages for various distros - - name: Package lsfg-vk for various distros - run: | - cp -rv target/* . - chmod +x ./package/package.sh - ./package/package.sh - # upload all files - - name: Upload lsfg-vk artifact - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/share/applications/lsfg-vk-ui.desktop - target/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - target/lib/liblsfg-vk.so - target/bin/lsfg-vk-ui - - name: Upload lsfg-vk artifact (without UI) - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk_noui - path: | - target/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json - target/lib/liblsfg-vk.so - - name: Upload lsfg-vk for dpkg - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.dpkg - path: | - *.deb - - name: Upload lsfg-vk for rpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.rpm - path: | - *.rpm - - name: Upload lsfg-vk for alpm - uses: actions/upload-artifact@v4 - with: - name: lsfg-vk.alpm - path: | - *.zst - # comment on pull request - - name: Comment on PR - uses: thollander/actions-comment-pull-request@v3 - with: - pr-number: ${{ github.event.issue.number }} - message: | - **Development Build** - - I have built this lsfg-vk pull request for you: - https://github.com/PancakeTAS/lsfg-vk/actions/runs/${{ github.run_id }} diff --git a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml similarity index 84% rename from flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml rename to dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml index 2b349b8..694dc06 100644 --- a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml +++ b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_23.08.yml @@ -20,11 +20,9 @@ modules: buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_C_COMPILER=clang - - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On + - -DCMAKE_CXX_COMPILER=clang++ + - -DLSFGVK_LAYER_LIBRARY_PATH=/usr/lib/extensions/vulkan/lsfgvk/lib/liblsfg-vk-layer.so sources: - type: dir - path: .. - - type: patch - path: VkLayer_LS_frame_generation.patch + path: ../../.. diff --git a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml similarity index 84% rename from flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml rename to dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml index 92fa4db..5aabfb5 100644 --- a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml +++ b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_24.08.yml @@ -20,11 +20,9 @@ modules: buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_C_COMPILER=clang - - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On + - -DCMAKE_CXX_COMPILER=clang++ + - -DLSFGVK_LAYER_LIBRARY_PATH=/usr/lib/extensions/vulkan/lsfgvk/lib/liblsfg-vk-layer.so sources: - type: dir - path: .. - - type: patch - path: VkLayer_LS_frame_generation.patch + path: ../../.. diff --git a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml similarity index 84% rename from flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml rename to dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml index 971190a..a4dc150 100644 --- a/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml +++ b/dist/flatpak/lsfg-vk-layer/org.freedesktop.Platform.VulkanLayer.lsfgvk_25.08.yml @@ -20,11 +20,9 @@ modules: buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_C_COMPILER=clang - - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On + - -DCMAKE_CXX_COMPILER=clang++ + - -DLSFGVK_LAYER_LIBRARY_PATH=/usr/lib/extensions/vulkan/lsfgvk/lib/liblsfg-vk-layer.so sources: - type: dir - path: .. - - type: patch - path: VkLayer_LS_frame_generation.patch + path: ../../.. diff --git a/flatpak/gay.pancake.lsfg-vk-ui.metainfo.xml b/dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.metainfo.xml similarity index 91% rename from flatpak/gay.pancake.lsfg-vk-ui.metainfo.xml rename to dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.metainfo.xml index 514459b..2915023 100644 --- a/flatpak/gay.pancake.lsfg-vk-ui.metainfo.xml +++ b/dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.metainfo.xml @@ -13,8 +13,8 @@ https://github.com/PancakeTAS/lsfg-vk/wiki https://github.com/PancakeTAS/lsfg-vk/wiki - MIT - MIT + CC0-1.0 + GPL-3.0-or-later

The lsfg-vk project brings Lossless Scaling's frame generation to Linux users by acting as a Vulkan layer inbetween your game and your graphics card.

diff --git a/dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.yml b/dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.yml new file mode 100644 index 0000000..854a3fa --- /dev/null +++ b/dist/flatpak/lsfg-vk-ui/gay.pancake.lsfg-vk-ui.yml @@ -0,0 +1,32 @@ +id: gay.pancake.lsfg-vk-ui +command: lsfg-vk-ui +default-branch: develop + +runtime: org.kde.Platform +runtime-version: '6.10' +sdk: org.kde.Sdk + +finish-args: + - --share=ipc + - --socket=fallback-x11 + - --socket=wayland + - --device=dri + - --filesystem=xdg-config + +modules: + - name: lsfg-vk-ui + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX=/app + - -DLSFGVK_BUILD_VULKAN_LAYER=Off + - -DLSFGVK_BUILD_USER_INTERFACE=On + - -DLSFGVK_INSTALL_XDG_FILES=On + sources: + - type: dir + path: ../../.. + - type: file + path: gay.pancake.lsfg-vk-ui.metainfo.xml + - type: shell + commands: + - install -Dm0644 gay.pancake.lsfg-vk-ui.metainfo.xml -t /app/share/metainfo/ diff --git a/flatpak/VkLayer_LS_frame_generation.patch b/flatpak/VkLayer_LS_frame_generation.patch deleted file mode 100644 index 7536718..0000000 --- a/flatpak/VkLayer_LS_frame_generation.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/VkLayer_LS_frame_generation.json b/VkLayer_LS_frame_generation.json -index ece2a5f..774a027 100644 ---- a/VkLayer_LS_frame_generation.json -+++ b/VkLayer_LS_frame_generation.json -@@ -4,7 +4,7 @@ - "name": "VK_LAYER_LS_frame_generation", - "type": "GLOBAL", - "api_version": "1.4.313", -- "library_path": "liblsfg-vk.so", -+ "library_path": "/usr/lib/extensions/vulkan/lsfgvk/lib/liblsfg-vk.so", - "implementation_version": "1", - "description": "Lossless Scaling frame generation layer", - "functions": { diff --git a/flatpak/gay.pancake.lsfg-vk-ui.yml b/flatpak/gay.pancake.lsfg-vk-ui.yml deleted file mode 100644 index 45a9ad6..0000000 --- a/flatpak/gay.pancake.lsfg-vk-ui.yml +++ /dev/null @@ -1,37 +0,0 @@ -id: gay.pancake.lsfg-vk-ui -command: lsfg-vk-ui -default-branch: develop - -runtime: org.gnome.Platform -runtime-version: '49' -sdk: org.gnome.Sdk - -finish-args: - - --share=ipc - - --socket=x11 - - --socket=wayland - - --device=dri - - --filesystem=xdg-config - -sdk-extensions: - - org.freedesktop.Sdk.Extension.rust-stable - -build-options: - append-path: /usr/lib/sdk/rust-stable/bin - build-args: - - --share=network - -modules: - - name: lsfg-vk-ui - buildsystem: simple - build-commands: - - cargo build --release --locked - - install -Dm755 ./target/release/lsfg-vk-ui /app/bin/lsfg-vk-ui - - install -Dm644 ./rsc/gay.pancake.lsfg-vk-ui.desktop /app/share/applications/gay.pancake.lsfg-vk-ui.desktop - - install -Dm644 ./rsc/icon.png /app/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - - install -Dm644 ./gay.pancake.lsfg-vk-ui.metainfo.xml /app/share/metainfo/gay.pancake.lsfg-vk-ui.metainfo.xml - sources: - - type: dir - path: ../ui - - type: file - path: gay.pancake.lsfg-vk-ui.metainfo.xml diff --git a/lsfg-vk-layer/CMakeLists.txt b/lsfg-vk-layer/CMakeLists.txt index 6a8522c..1d5c122 100644 --- a/lsfg-vk-layer/CMakeLists.txt +++ b/lsfg-vk-layer/CMakeLists.txt @@ -13,7 +13,8 @@ set_target_properties(lsfg-vk-layer PROPERTIES CXX_VISIBILITY_PRESET hidden) set(LSFGVK_LAYER_LIBRARY_PATH - "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/liblsfg-vk-layer.so") + "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/liblsfg-vk-layer.so" + CACHE STRING "Path to Vulkan layer shared object") configure_file( "VkLayer_LSFGVK_frame_generation.json.in" "VkLayer_LSFGVK_frame_generation.json" diff --git a/lsfg-vk-ui/CMakeLists.txt b/lsfg-vk-ui/CMakeLists.txt index b2b79c4..f151e98 100644 --- a/lsfg-vk-ui/CMakeLists.txt +++ b/lsfg-vk-ui/CMakeLists.txt @@ -44,6 +44,6 @@ install(TARGETS lsfg-vk-ui if(LSFGVK_INSTALL_XDG_FILES) install(FILES "rsc/gay.pancake.lsfg-vk-ui.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps") - install(FILES "rsc/lsfg-vk-ui.desktop" + install(FILES "rsc/gay.pancake.lsfg-vk-ui.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") endif() diff --git a/lsfg-vk-ui/rsc/lsfg-vk-ui.desktop b/lsfg-vk-ui/rsc/gay.pancake.lsfg-vk-ui.desktop similarity index 100% rename from lsfg-vk-ui/rsc/lsfg-vk-ui.desktop rename to lsfg-vk-ui/rsc/gay.pancake.lsfg-vk-ui.desktop diff --git a/lsfg-vk-ui/src/utils.cpp b/lsfg-vk-ui/src/utils.cpp index bd8309b..ea19a04 100644 --- a/lsfg-vk-ui/src/utils.cpp +++ b/lsfg-vk-ui/src/utils.cpp @@ -35,6 +35,10 @@ QStringList ui::getAvailableGPUs() { // NOLINT (IWYU) // expected } + // first remove 1:1 duplicates + std::ranges::sort(gpus); + gpus.erase(std::ranges::unique(gpus).begin(), gpus.end()); + // build the frontend list QStringList list{"Default"}; // NOLINT (IWYU) for (const auto& gpu : gpus) { @@ -46,10 +50,16 @@ QStringList ui::getAvailableGPUs() { // NOLINT (IWYU) ); // add pci id to distinguish, otherwise add just the name + QString entry; if (count > 1 && gpu.second.has_value()) - list.append(QString::fromStdString(*gpu.second)); + entry = QString::fromStdString(*gpu.second); else - list.append(QString::fromStdString(gpu.first)); + entry = QString::fromStdString(gpu.first); + + // ensure no duplicates (flatpak does funny things) + if (list.contains(entry)) + continue; + list.append(entry); } return list; diff --git a/package/alpm.PKGINFO b/package/alpm.PKGINFO deleted file mode 100644 index 3e29674..0000000 --- a/package/alpm.PKGINFO +++ /dev/null @@ -1,12 +0,0 @@ -pkgname = lsfg-vk -pkgbase = lsfg-vk -pkgver = ${ALPM_VERSION}-1 -pkgdesc = "Lossless Scaling Frame Generation on Linux via DXVK/Vulkan" -url = https://discord.gg/losslessscaling -packager = "PancakeTAS " -arch = x86_64 -license = MIT -depend = vulkan-icd-loader -depend = libadwaita -depend = gtk4 -depend = glibc diff --git a/package/dpkg.control b/package/dpkg.control deleted file mode 100644 index 0ac2e8f..0000000 --- a/package/dpkg.control +++ /dev/null @@ -1,12 +0,0 @@ -Package: lsfg-vk -Description: Lossless Scaling Frame Generation on Linux via DXVK/Vulkan -Homepage: https://discord.gg/losslessscaling -Maintainer: "PancakeTAS " -Version: ${DPKG_VERSION} -Architecture: amd64 -Section: utils -Priority: optional -Depends: libc6 (>= 2.38-1), - libvulkan1, - libadwaita-1-0, - libgtk-4-1 diff --git a/package/package.sh b/package/package.sh deleted file mode 100755 index cee5347..0000000 --- a/package/package.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -if [ -z "$VERSION" ]; then - set -eux - export VERSION="1.1.0" - export ALPM_VERSION=$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | sed "s/.\..\../$VERSION/") - export DPKG_VERSION=$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | sed "s/^v.\..\..\.r[1-9]\+./$VERSION~git$(date '+%Y%m%d')./") - export RPM_VERSION=$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | sed "s/v.\..\...r/$VERSION^/") -else - set -eux - export ALPM_VERSION="$VERSION" - export DPKG_VERSION="$VERSION" - export RPM_VERSION="$VERSION" -fi - -# set permission bits -chmod 755 bin/lsfg-vk-ui -chmod 755 lib/liblsfg-vk.so -chmod 644 share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json -chmod 644 share/applications/lsfg-vk-ui.desktop -chmod 644 share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - -# build alpm package -echo "Building ALPM package..." - -mkdir -pv alpm -envsubst < package/alpm.PKGINFO > alpm/.PKGINFO - -mkdir -pv alpm/usr/{bin,lib,share/vulkan/implicit_layer.d,share/applications,share/icons/hicolor/256x256/apps} -cp -v bin/lsfg-vk-ui alpm/usr/bin/lsfg-vk-ui -cp -v lib/liblsfg-vk.so alpm/usr/lib/liblsfg-vk.so -cp -v share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json \ - alpm/usr/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json -cp -v share/applications/lsfg-vk-ui.desktop \ - alpm/usr/share/applications/lsfg-vk-ui.desktop -cp -v share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png \ - alpm/usr/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - -tar -cvzf "lsfg-vk-$VERSION.x86_64.tar.zst" -C alpm \ - .PKGINFO usr - -# build dpkg package -echo "Building DEB package..." - -mkdir -pv deb/DEBIAN -envsubst < package/dpkg.control > deb/DEBIAN/control - -mkdir -pv deb/usr/{bin,lib,share/vulkan/implicit_layer.d,share/applications,share/icons/hicolor/256x256/apps} -cp -v bin/lsfg-vk-ui deb/usr/bin/lsfg-vk-ui -cp -v lib/liblsfg-vk.so deb/usr/lib/liblsfg-vk.so -cp -v share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json \ - deb/usr/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json -cp -v share/applications/lsfg-vk-ui.desktop \ - deb/usr/share/applications/lsfg-vk-ui.desktop -cp -v share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png \ - deb/usr/share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - -dpkg-deb --root-owner-group --build deb "lsfg-vk-$VERSION.x86_64.deb" - -# build rpm package -echo "Building RPM package..." - -mkdir -pv rpm -envsubst < package/rpm.spec > rpm/lsfg-vk.spec - -mkdir -pv rpm/SOURCES -cp -v bin/lsfg-vk-ui rpm/SOURCES -cp -v lib/liblsfg-vk.so rpm/SOURCES -cp -v share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json \ - rpm/SOURCES -cp -v share/applications/lsfg-vk-ui.desktop \ - rpm/SOURCES/lsfg-vk-ui.desktop -cp -v share/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png \ - rpm/SOURCES/gay.pancake.lsfg-vk-ui.png - -rpmbuild -bb rpm/lsfg-vk.spec --define "_topdir $(pwd)/rpm" -mv -v "rpm/RPMS/x86_64/lsfg-vk-$RPM_VERSION-1.x86_64.rpm" "lsfg-vk-$VERSION.x86_64.rpm" - -# cleanup -rm -rf alpm deb rpm diff --git a/package/rpm.spec b/package/rpm.spec deleted file mode 100644 index 497d360..0000000 --- a/package/rpm.spec +++ /dev/null @@ -1,33 +0,0 @@ -Name: lsfg-vk -Summary: Lossless Scaling Frame Generation on Linux via DXVK/Vulkan -Version: ${RPM_VERSION} -Release: 1%{?dist} -URL: https://discord.gg/losslessscaling -Packager: "PancakeTAS " -License: MIT -Group: Applications/System -BuildArch: x86_64 - -Requires: glibc >= 2.38 -Requires: vulkan-loader -Requires: libadwaita -Requires: gtk4 - -%global __strip /bin/true - -%description -Lossless Scaling Frame Generation on Linux via DXVK/Vulkan. - -%install -install -Dm755 %{_sourcedir}/lsfg-vk-ui %{buildroot}%{_bindir}/lsfg-vk-ui -install -Dm755 %{_sourcedir}/liblsfg-vk.so %{buildroot}%{_libdir}/liblsfg-vk.so -install -Dm644 %{_sourcedir}/VkLayer_LS_frame_generation.json %{buildroot}%{_datadir}/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json -install -Dm644 %{_sourcedir}/lsfg-vk-ui.desktop %{buildroot}%{_datadir}/applications/lsfg-vk-ui.desktop -install -Dm644 %{_sourcedir}/gay.pancake.lsfg-vk-ui.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png - -%files -%{_bindir}/lsfg-vk-ui -%{_libdir}/liblsfg-vk.so -%{_datadir}/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json -%{_datadir}/applications/lsfg-vk-ui.desktop -%{_datadir}/icons/hicolor/256x256/apps/gay.pancake.lsfg-vk-ui.png