Pipewire: dont attempt to use modifier if modifier is 0x0

This commit is contained in:
dec05eba
2025-07-20 21:48:39 +02:00
parent bd91c664a6
commit 4fb0dad3df
3 changed files with 4 additions and 5 deletions

4
TODO
View File

@@ -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.
Record first video/audio frame immediately.
Disable GL_DEPTH_TEST, GL_CULL_FACE.

View File

@@ -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";

View File

@@ -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");