aboutsummaryrefslogtreecommitdiff
path: root/src/encoder
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-06 12:41:14 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-06 12:41:14 +0200
commit954a41de9cde43f68eae0340cc1ed109257f9356 (patch)
tree2556c09a3e53c656fe265c20475476c5c31314a5 /src/encoder
parent239f2010f5b91117ecd485ac20c541a1e8ecd434 (diff)
Explicit glFlush/glFinish before and after render operations to fix tearing and stutter on amd
Diffstat (limited to 'src/encoder')
-rw-r--r--src/encoder/video/software.c3
1 files changed, 3 insertions, 0 deletions
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) {