mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-01-21 02:20:26 +01:00
Merge branch 'fix_layout_color_assert' into 'master'
fix color_range assertion when wlr_color_representation_v1 is used See merge request wlroots/wlroots!5242
This commit is contained in:
commit
8b7bf2b384
1 changed files with 10 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue