diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c index db7a659d6..89b1d839c 100644 --- a/render/vulkan/pass.c +++ b/render/vulkan/pass.c @@ -843,18 +843,20 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass, color_range = WLR_COLOR_RANGE_LIMITED; } + struct wlr_vk_pipeline_layout_key layout = { + .filter_mode = options->filter_mode + }; + if(texture->format->is_ycbcr) { + layout.ycbcr.format = texture->format; + layout.ycbcr.range = color_range; + layout.ycbcr.encoding = color_encoding; + } + struct wlr_vk_pipeline *pipe = setup_get_or_create_pipeline( pass->render_setup, &(struct wlr_vk_pipeline_key) { .source = WLR_VK_SHADER_SOURCE_TEXTURE, - .layout = { - .ycbcr = { - .format = texture->format->is_ycbcr ? texture->format : NULL, - .encoding = color_encoding, - .range = color_range, - }, - .filter_mode = options->filter_mode, - }, + .layout = layout, .texture_transform = tex_transform, .blend_mode = !texture->has_alpha && alpha == 1.0 ? WLR_RENDER_BLEND_MODE_NONE : options->blend_mode,