mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Fix cursor flicker on nvidia when capturing monitor
Thanks to David Kleuker for bug testing
This commit is contained in:
@@ -553,6 +553,9 @@ static int gsr_capture_v4l2_capture(gsr_capture *cap, gsr_capture_metadata *capt
|
||||
const vec2i target_pos = gsr_capture_get_target_position(output_size, capture_metadata);
|
||||
|
||||
self->params.egl->glFlush();
|
||||
// TODO: Use the minimal barrier required
|
||||
self->params.egl->glMemoryBarrier(GL_ALL_BARRIER_BITS);
|
||||
// TODO: Remove this?
|
||||
if(self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA)
|
||||
self->params.egl->glFinish();
|
||||
|
||||
|
||||
@@ -781,7 +781,6 @@ static void gsr_color_conversion_draw_graphics(gsr_color_conversion *self, unsig
|
||||
self->params.egl->glBindBuffer(GL_ARRAY_BUFFER, self->vertex_buffer_object_id);
|
||||
self->params.egl->glBufferSubData(GL_ARRAY_BUFFER, 0, 24 * sizeof(float), vertices);
|
||||
|
||||
// TODO:
|
||||
switch(source_color) {
|
||||
case GSR_SOURCE_COLOR_RGB:
|
||||
case GSR_SOURCE_COLOR_BGR: {
|
||||
|
||||
@@ -523,4 +523,7 @@ void gsr_egl_swap_buffers(gsr_egl *self) {
|
||||
self->glFlush();
|
||||
// TODO: Use the minimal barrier required
|
||||
self->glMemoryBarrier(GL_ALL_BARRIER_BITS); // GL_SHADER_IMAGE_ACCESS_BARRIER_BIT
|
||||
// TODO: This is needed on nvidia because the cursor can flicker otherwise. Find a better solution
|
||||
if(self->gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA)
|
||||
self->glFinish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user