mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-24 10:39:49 +09:00
Disable prime-run + portal for now
This commit is contained in:
4
TODO
4
TODO
@@ -156,4 +156,6 @@ Explicit sync is done with the drm property IN_FENCE_FD (see https://drmdb.emers
|
|||||||
|
|
||||||
The update fps appear to be lower when recording a monitor instead of using portal on intel. Does this reflect in game framerate?
|
The update fps appear to be lower when recording a monitor instead of using portal on intel. Does this reflect in game framerate?
|
||||||
|
|
||||||
Recording a monitor belonging to another gpu might be possible by using GL_TEXTURE_EXTERNAL_OES instead for the texture.
|
Recording a monitor belonging to another gpu might be possible by using GL_TEXTURE_EXTERNAL_OES instead for the texture.
|
||||||
|
|
||||||
|
Fix glitches when using prime-run with desktop portal. It happens when moving a window around. It's probably a syncing issue.
|
||||||
27
src/main.cpp
27
src/main.cpp
@@ -1654,6 +1654,18 @@ static bool is_xwayland(Display *display) {
|
|||||||
return xwayland_found;
|
return xwayland_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool is_using_prime_run() {
|
||||||
|
const char *prime_render_offload = getenv("__NV_PRIME_RENDER_OFFLOAD");
|
||||||
|
return prime_render_offload && strcmp(prime_render_offload, "1") == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void disable_prime_run() {
|
||||||
|
unsetenv("__NV_PRIME_RENDER_OFFLOAD");
|
||||||
|
unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
|
||||||
|
unsetenv("__GLX_VENDOR_LIBRARY_NAME");
|
||||||
|
unsetenv("__VK_LAYER_NV_optimus");
|
||||||
|
}
|
||||||
|
|
||||||
static void list_system_info(bool wayland) {
|
static void list_system_info(bool wayland) {
|
||||||
printf("display_server %s\n", wayland ? "wayland" : "x11");
|
printf("display_server %s\n", wayland ? "wayland" : "x11");
|
||||||
}
|
}
|
||||||
@@ -1767,10 +1779,7 @@ static void info_command() {
|
|||||||
// Disable prime-run and similar options as it doesn't work, the monitor to capture has to be run on the same device.
|
// Disable prime-run and similar options as it doesn't work, the monitor to capture has to be run on the same device.
|
||||||
// This is fine on wayland since nvidia uses drm interface there and the monitor query checks the monitors connected
|
// This is fine on wayland since nvidia uses drm interface there and the monitor query checks the monitors connected
|
||||||
// to the drm device.
|
// to the drm device.
|
||||||
unsetenv("__NV_PRIME_RENDER_OFFLOAD");
|
disable_prime_run();
|
||||||
unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
|
|
||||||
unsetenv("__GLX_VENDOR_LIBRARY_NAME");
|
|
||||||
unsetenv("__VK_LAYER_NV_optimus");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gsr_egl egl;
|
gsr_egl egl;
|
||||||
@@ -2459,10 +2468,12 @@ int main(int argc, char **argv) {
|
|||||||
// Disable prime-run and similar options as it doesn't work, the monitor to capture has to be run on the same device.
|
// Disable prime-run and similar options as it doesn't work, the monitor to capture has to be run on the same device.
|
||||||
// This is fine on wayland since nvidia uses drm interface there and the monitor query checks the monitors connected
|
// This is fine on wayland since nvidia uses drm interface there and the monitor query checks the monitors connected
|
||||||
// to the drm device.
|
// to the drm device.
|
||||||
unsetenv("__NV_PRIME_RENDER_OFFLOAD");
|
disable_prime_run();
|
||||||
unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
|
}
|
||||||
unsetenv("__GLX_VENDOR_LIBRARY_NAME");
|
|
||||||
unsetenv("__VK_LAYER_NV_optimus");
|
if(strcmp(window_str, "portal") == 0 && is_using_prime_run()) {
|
||||||
|
fprintf(stderr, "Warning: use of prime-run with -w portal option is currently not supported. Disabling prime-run\n");
|
||||||
|
disable_prime_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(video_codec_is_hdr(video_codec) && !wayland) {
|
if(video_codec_is_hdr(video_codec) && !wayland) {
|
||||||
|
|||||||
Reference in New Issue
Block a user