diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-06-07 11:47:27 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-06-07 11:51:49 +0200 |
commit | b0b1442a037be7bc6b07c11920dbf25207a9136e (patch) | |
tree | ca4e82a5d7a72c22e62bb9c21610a4a9d63ca307 /src | |
parent | baa7bfd5e460c8401385e098649eee07db7a6614 (diff) |
Swap flush and memory barrier5.5.7
Diffstat (limited to 'src')
-rw-r--r-- | src/color_conversion.c | 3 | ||||
-rw-r--r-- | src/egl.c | 12 |
2 files changed, 3 insertions, 12 deletions
diff --git a/src/color_conversion.c b/src/color_conversion.c index 858990c..caae0b0 100644 --- a/src/color_conversion.c +++ b/src/color_conversion.c @@ -920,7 +920,6 @@ void gsr_color_conversion_draw(gsr_color_conversion *self, unsigned int texture_ source_position.x += source_pos.x; source_position.y += source_pos.y; gsr_color_conversion_draw_graphics(self, texture_id, external_texture, rotation_matrix, source_position, source_size, destination_pos, texture_size, scale, source_color); - // TODO: Is glFlush and glFinish needed here for graphics garbage? } else { switch(rotation) { case GSR_ROT_0: @@ -955,13 +954,13 @@ void gsr_color_conversion_draw(gsr_color_conversion *self, unsigned int texture_ } } + self->params.egl->glFlush(); // TODO: Use the minimal barrier required self->params.egl->glMemoryBarrier(GL_ALL_BARRIER_BITS); // GL_SHADER_IMAGE_ACCESS_BARRIER_BIT self->params.egl->glUseProgram(0); gsr_color_conversion_swizzle_reset(self, source_color); self->params.egl->glBindTexture(texture_target, 0); - self->params.egl->glFlush(); } void gsr_color_conversion_clear(gsr_color_conversion *self) { @@ -517,15 +517,7 @@ void gsr_egl_unload(gsr_egl *self) { } void gsr_egl_swap_buffers(gsr_egl *self) { - /* This uses less cpu than swap buffer on nvidia */ - // TODO: Do these and remove swap self->glFlush(); -// self->glFinish(); - // if(self->egl_display) { - // self->eglSwapBuffers(self->egl_display, self->egl_surface); - // } else if(gsr_window_get_display_server(self->window) == GSR_DISPLAY_SERVER_X11) { - // Display *display = gsr_window_get_display(self->window); - // const Window window = (Window)gsr_window_get_window(self->window); - // self->glXSwapBuffers(display, window); - // } + // TODO: Use the minimal barrier required + self->glMemoryBarrier(GL_ALL_BARRIER_BITS); // GL_SHADER_IMAGE_ACCESS_BARRIER_BIT } |