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

Fix AMD video HW Accel and lib path, #1079 #1080

Open
wants to merge 8 commits into
base: main-v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flatpak/amd_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd /usr/bin
/usr/bin/flatpak run io.github.unknownskl.greenlight --enable-features=VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,CanvasOopRasterization --enable-oop-rasterization --disable-features=UseChromeOSDirectVideoDecoder --enable-accelerated-video-decode --ozone-platform-hint=x11
4 changes: 2 additions & 2 deletions flatpak/build_bundle_manually.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export PATH=${PATH}:${HOME}/.local/bin
cd ..

flatpak-node-generator yarn ../yarn.lock -o ./yarn-sources.json
flatpak-builder --force-clean build-dir ./dev.unknownskl.greenlight.yml
flatpak-builder --force-clean build-dir ./io.github.unknownskl.greenlight.yml
flatpak build-export export-dir build-dir
flatpak build-bundle export-dir Greenlight.flatpak dev.unknownskl.greenlight --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
flatpak build-bundle export-dir Greenlight.flatpak io.github.unknownskl.greenlight --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo

echo done
3 changes: 3 additions & 0 deletions flatpak/intel_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd /usr/bin
/usr/bin/flatpak run io.github.unknownskl.greenlight --enable-features=CanvasOopRasterization,VaapiVideoDecoder,VaapiVideoDecodeLinuxGL,VaapiIgnoreDriverChecks,PlatformHEVCDecoderSupport --use-cmd-decoder=passthrough --ignore-gpu-blocklist --enable-zero-copy --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-gpu-memory-buffer-video-frames --disable-features=UseChromeOSDirectVideoDecoder --no-sandbox --use-vulkan
7 changes: 5 additions & 2 deletions flatpak/io.github.unknownskl.greenlight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ modules:
npm_config_offline: 'true'
yarn_config_cache: /run/build/greenlight/flatpak-node/yarn-mirror
build-commands:
- cp -a ../extralib -t /app/
- cp -a ../extralib/extralib -t /app/
- cp -a ../extralib/reduceSoFiles.sh -t /app/extralib
- gunzip /app/extralib/libLLVM-16.0.6.so.gz
- pushd /app/extralib && ln -s libLLVM-16.0.6.so libLLVM-16.so && chmod +x reduceSoFiles.sh && ./reduceSoFiles.sh && popd
- yarn --offline
- yarn run flatpak-build --offline -- --linux
# Add icon, metadata and desktop file
Expand All @@ -55,7 +58,7 @@ modules:
- type: git
url: https://github.com/Originalimoc/amd-patched-mesa
dest: extralib
commit: "dd468982c84d77b1679a45f082af102b665dfd26"
commit: "a70058baf35f1823613f2577c30a477e93cd106a"
- yarn-sources.json
- type: inline
dest-filename: .yarnrc
Expand Down
14 changes: 14 additions & 0 deletions main/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default class Application {
private _isQuitting:boolean = false

private _mainWindow
private _gpuWindow
public _events:Events
public _ipc:Ipc
public _authentication:Authentication
Expand Down Expand Up @@ -107,6 +108,19 @@ export default class Application {

this.log('electron', __filename+'[loadApplicationDefaults()] Electron has been fully loaded. Ready to open windows')

/* for future debugging
this._gpuWindow = new BrowserWindow({
width: 800,
height: 600,
});

// Load chrome://gpu
this._gpuWindow.loadURL('chrome://gpu');

// Open DevTools
this._gpuWindow.webContents.openDevTools();
*/

this.openMainWindow()
this._authentication.startWebviewHooks()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.13.2",
"babel-loader": "^9.1.3",
"electron": "27",
"electron": "25",
"electron-builder": "^24.9.1",
"eslint": "^8.54.0",
"next": "^13.5.6",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2757,10 +2757,10 @@ electron-to-chromium@^1.4.535:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz#04e09c2ee31dc0f1546174033809b54cc372740b"
integrity sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ==

electron@27:
version "27.1.3"
resolved "https://registry.yarnpkg.com/electron/-/electron-27.1.3.tgz#3fd6decda95c1dd0a7e51a9ac77ee0ba37b7c5c6"
integrity sha512-7eD8VMhhlL5J531OOawn00eMthUkX1e3qN5Nqd7eMK8bg5HxQBrn8bdPlvUEnCano9KhrVwaDnGeuzWoDOGpjQ==
electron@25:
version "25.8.2"
resolved "https://registry.yarnpkg.com/electron/-/electron-25.8.2.tgz#5e8ea742b68a7d1427bf78902ec40a5b7231a58b"
integrity sha512-AM1ra6b16EQuO1bJtiA8ZiWqqFLLgVfxD56ykiy+EA5C63Hkx8OmIbe+5JAsLiTwRVvBZ4oCAj6wa2qT+iq8ww==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^18.11.18"
Expand Down
Loading