mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-21 17:27:23 +09:00
Fix portal capture on broken amd drivers: fallback to opengl copy instead of vaapi on known buggy mesa version
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user