diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-21 00:25:56 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-21 00:25:56 +0100 |
commit | 02673c46445a78324416e08ec61284012f7bcc8d (patch) | |
tree | 54cf80ba361b6981cdecebe74e89c8b89dd8680a /src/capture | |
parent | 68c9781f44bddc7256677668b559cd02f29bb059 (diff) |
Fix portal capture on broken amd drivers: fallback to opengl copy instead of vaapi on known buggy mesa versionHEADmaster
Diffstat (limited to 'src/capture')
-rw-r--r-- | src/capture/kms.c | 4 | ||||
-rw-r--r-- | src/capture/portal.c | 4 | ||||
-rw-r--r-- | src/capture/xcomposite.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/capture/kms.c b/src/capture/kms.c index c85811e..fcf3b85 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -224,6 +224,10 @@ static int gsr_capture_kms_start(gsr_capture *cap, AVCodecContext *video_codec_c video_codec_context->height = FFALIGN(self->params.output_resolution.y, 2); } + self->fast_path_failed = self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && !gl_driver_version_greater_than(self->params.egl, 24, 0, 9); + if(self->fast_path_failed) + fprintf(stderr, "gsr warning: gsr_capture_kms_start: your amd driver (mesa) version is known to be buggy (<= version 24.0.9), falling back to opengl copy\n"); + frame->width = video_codec_context->width; frame->height = video_codec_context->height; diff --git a/src/capture/portal.c b/src/capture/portal.c index d68e86f..a441299 100644 --- a/src/capture/portal.c +++ b/src/capture/portal.c @@ -310,6 +310,10 @@ static int gsr_capture_portal_start(gsr_capture *cap, AVCodecContext *video_code video_codec_context->height = FFALIGN(self->params.output_resolution.y, 2); } + self->fast_path_failed = self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && !gl_driver_version_greater_than(self->params.egl, 24, 0, 9); + if(self->fast_path_failed) + fprintf(stderr, "gsr warning: gsr_capture_kms_start: your amd driver (mesa) version is known to be buggy (<= version 24.0.9), falling back to opengl copy\n"); + frame->width = video_codec_context->width; frame->height = video_codec_context->height; diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c index 2867b45..79cd60a 100644 --- a/src/capture/xcomposite.c +++ b/src/capture/xcomposite.c @@ -122,6 +122,10 @@ static int gsr_capture_xcomposite_start(gsr_capture *cap, AVCodecContext *video_ video_codec_context->height = FFALIGN(self->params.output_resolution.y, 2); } + self->fast_path_failed = self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && !gl_driver_version_greater_than(self->params.egl, 24, 0, 9); + if(self->fast_path_failed) + fprintf(stderr, "gsr warning: gsr_capture_kms_start: your amd driver (mesa) version is known to be buggy (<= version 24.0.9), falling back to opengl copy\n"); + frame->width = video_codec_context->width; frame->height = video_codec_context->height; |