Disable pure vaapi for intel because it doesn't work, will be fixed later if possible

This commit is contained in:
dec05eba
2024-09-17 00:09:03 +02:00
parent 09fa00d4a7
commit 85d35bede2
4 changed files with 8 additions and 6 deletions

6
TODO
View File

@@ -152,6 +152,8 @@ Allow prime-run on x11 if monitor capture and the prime gpu is not nvidia.
Enable 2-pass encoding. Enable 2-pass encoding.
Add vbr/cbr option. Add cbr option.
Restart replay/update video resolution if monitor resolution changes. Restart replay/update video resolution if monitor resolution changes.
Fix pure vaapi copy on intel.

View File

@@ -552,7 +552,7 @@ static int gsr_capture_kms_capture(gsr_capture *cap, AVFrame *frame, gsr_color_c
if(drm_fd->has_hdr_metadata && self->params.hdr && hdr_metadata_is_supported_format(&drm_fd->hdr_metadata)) if(drm_fd->has_hdr_metadata && self->params.hdr && hdr_metadata_is_supported_format(&drm_fd->hdr_metadata))
gsr_kms_set_hdr_metadata(self, drm_fd); gsr_kms_set_hdr_metadata(self, drm_fd);
if(!self->performance_error_shown && self->monitor_rotation != GSR_MONITOR_ROT_0 && video_codec_context_is_vaapi(self->video_codec_context)) { if(!self->performance_error_shown && self->monitor_rotation != GSR_MONITOR_ROT_0 && video_codec_context_is_vaapi(self->video_codec_context) && self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD) {
self->performance_error_shown = true; self->performance_error_shown = true;
fprintf(stderr,"gsr warning: gsr_capture_kms_capture: the monitor you are recording is rotated, composition will have to be used." fprintf(stderr,"gsr warning: gsr_capture_kms_capture: the monitor you are recording is rotated, composition will have to be used."
" If you are experience performance problems in the video then record a single window on X11 or use portal capture option instead\n"); " If you are experience performance problems in the video then record a single window on X11 or use portal capture option instead\n");
@@ -576,7 +576,7 @@ static int gsr_capture_kms_capture(gsr_capture *cap, AVFrame *frame, gsr_color_c
} }
/* Fast opengl free path */ /* Fast opengl free path */
if(self->monitor_rotation == GSR_MONITOR_ROT_0 && video_codec_context_is_vaapi(self->video_codec_context)) { if(self->monitor_rotation == GSR_MONITOR_ROT_0 && video_codec_context_is_vaapi(self->video_codec_context) && self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD) {
int fds[4]; int fds[4];
uint32_t offsets[4]; uint32_t offsets[4];
uint32_t pitches[4]; uint32_t pitches[4];

View File

@@ -342,7 +342,7 @@ static int gsr_capture_portal_capture(gsr_capture *cap, AVFrame *frame, gsr_colo
// TODO: Handle region crop // TODO: Handle region crop
/* Fast opengl free path */ /* Fast opengl free path */
if(video_codec_context_is_vaapi(self->video_codec_context)) { if(video_codec_context_is_vaapi(self->video_codec_context) && self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD) {
int fds[4]; int fds[4];
uint32_t offsets[4]; uint32_t offsets[4];
uint32_t pitches[4]; uint32_t pitches[4];

View File

@@ -262,7 +262,7 @@ static int gsr_capture_xcomposite_capture(gsr_capture *cap, AVFrame *frame, gsr_
self->params.egl->glFinish(); self->params.egl->glFinish();
/* Fast opengl free path */ /* Fast opengl free path */
if(video_codec_context_is_vaapi(self->video_codec_context)) { if(video_codec_context_is_vaapi(self->video_codec_context) && self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD) {
vaapi_copy_egl_image_to_video_surface(self->params.egl, self->window_texture.image, (vec2i){0, 0}, self->texture_size, target_pos, self->texture_size, self->video_codec_context, frame); vaapi_copy_egl_image_to_video_surface(self->params.egl, self->window_texture.image, (vec2i){0, 0}, self->texture_size, target_pos, self->texture_size, self->video_codec_context, frame);
} else { } else {
gsr_color_conversion_draw(color_conversion, window_texture_get_opengl_texture_id(&self->window_texture), gsr_color_conversion_draw(color_conversion, window_texture_get_opengl_texture_id(&self->window_texture),