From 4fb0dad3df1be8dd9fb5c5809a5e81fa63b6443c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 20 Jul 2025 21:48:39 +0200 Subject: [PATCH] Pipewire: dont attempt to use modifier if modifier is 0x0 --- TODO | 4 +++- src/color_conversion.c | 3 --- src/pipewire_video.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 5162138..f7bc8e8 100644 --- a/TODO +++ b/TODO @@ -312,4 +312,6 @@ When constant framerate is used (and for audio) multiple frames need to be encod Colors are correct, but they look incorrect for thin elements, such as colored text. This can be improved by sampling neighbor pixels for color average. -Record first video/audio frame immediately. \ No newline at end of file +Record first video/audio frame immediately. + +Disable GL_DEPTH_TEST, GL_CULL_FACE. diff --git a/src/color_conversion.c b/src/color_conversion.c index 23b166e..28b1712 100644 --- a/src/color_conversion.c +++ b/src/color_conversion.c @@ -254,7 +254,6 @@ static int load_graphics_shader_y(gsr_shader *shader, gsr_egl *egl, gsr_color_gr "} \n"); const char *main_code = - main_code = " vec4 pixel = texture(tex1, texcoords_out); \n" " FragColor.x = (RGBtoYUV * vec4(pixel.rgb, 1.0)).x; \n" " FragColor.w = pixel.a; \n"; @@ -317,7 +316,6 @@ static unsigned int load_graphics_shader_uv(gsr_shader *shader, gsr_egl *egl, gs "} \n"); const char *main_code = - main_code = " vec4 pixel = texture(tex1, texcoords_out); \n" " FragColor.xy = (RGBtoYUV * vec4(pixel.rgb, 1.0)).yz; \n" " FragColor.w = pixel.a; \n"; @@ -378,7 +376,6 @@ static unsigned int load_graphics_shader_rgb(gsr_shader *shader, gsr_egl *egl, g "} \n"); const char *main_code = - main_code = " vec4 pixel = texture(tex1, texcoords_out); \n" " FragColor = pixel; \n"; diff --git a/src/pipewire_video.c b/src/pipewire_video.c index 277004c..54500fc 100644 --- a/src/pipewire_video.c +++ b/src/pipewire_video.c @@ -730,7 +730,7 @@ static EGLImage gsr_pipewire_video_create_egl_image_with_fallback(gsr_pipewire_v if(self->no_modifiers_fallback) { image = gsr_pipewire_video_create_egl_image(self, fds, offsets, pitches, modifiers, false); } else { - image = gsr_pipewire_video_create_egl_image(self, fds, offsets, pitches, modifiers, true); + image = gsr_pipewire_video_create_egl_image(self, fds, offsets, pitches, modifiers, self->format.info.raw.modifier != 0); if(!image) { if(self->renegotiated) { fprintf(stderr, "gsr error: gsr_pipewire_video_create_egl_image_with_fallback: failed to create egl image with modifiers, trying without modifiers\n");