diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-06 12:41:14 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-06 12:41:14 +0200 |
commit | 954a41de9cde43f68eae0340cc1ed109257f9356 (patch) | |
tree | 2556c09a3e53c656fe265c20475476c5c31314a5 /src/capture/nvfbc.c | |
parent | 239f2010f5b91117ecd485ac20c541a1e8ecd434 (diff) |
Explicit glFlush/glFinish before and after render operations to fix tearing and stutter on amd
Diffstat (limited to 'src/capture/nvfbc.c')
-rw-r--r-- | src/capture/nvfbc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/capture/nvfbc.c b/src/capture/nvfbc.c index 80fbaa8..b7e6bb5 100644 --- a/src/capture/nvfbc.c +++ b/src/capture/nvfbc.c @@ -408,11 +408,17 @@ static int gsr_capture_nvfbc_capture(gsr_capture *cap, AVFrame *frame, gsr_color return 0; } + cap_nvfbc->params.egl->glFlush(); + cap_nvfbc->params.egl->glFinish(); + gsr_color_conversion_draw(color_conversion, cap_nvfbc->setup_params.dwTextures[grab_params.dwTextureIndex], (vec2i){0, 0}, (vec2i){frame->width, frame->height}, (vec2i){0, 0}, (vec2i){frame->width, frame->height}, 0.0f, false); + cap_nvfbc->params.egl->glFlush(); + cap_nvfbc->params.egl->glFinish(); + return 0; } |