From 954a41de9cde43f68eae0340cc1ed109257f9356 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 6 Sep 2024 12:41:14 +0200 Subject: Explicit glFlush/glFinish before and after render operations to fix tearing and stutter on amd --- src/encoder/video/software.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/encoder/video/software.c') diff --git a/src/encoder/video/software.c b/src/encoder/video/software.c index 89b2cf0..4a4b78a 100644 --- a/src/encoder/video/software.c +++ b/src/encoder/video/software.c @@ -112,6 +112,9 @@ static void gsr_video_encoder_software_copy_textures_to_frame(gsr_video_encoder } encoder_software->params.egl->glBindTexture(GL_TEXTURE_2D, 0); // cap_kms->kms.base.egl->eglSwapBuffers(cap_kms->kms.base.egl->egl_display, cap_kms->kms.base.egl->egl_surface); + + encoder_software->params.egl->glFlush(); + encoder_software->params.egl->glFinish(); } static void gsr_video_encoder_software_get_textures(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color) { -- cgit v1.2.3