aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/vulkan/renderer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index 064f5055..039f6ef7 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -2100,6 +2100,10 @@ static bool pipeline_key_equals(const struct wlr_vk_pipeline_key *a,
return false;
}
+ if (a->blend_mode != b->blend_mode) {
+ return false;
+ }
+
if (a->source != b->source) {
return false;
}
@@ -2194,7 +2198,7 @@ struct wlr_vk_pipeline *setup_get_or_create_pipeline(
};
VkPipelineColorBlendAttachmentState blend_attachment = {
- .blendEnable = true,
+ .blendEnable = key->blend_mode == WLR_RENDER_BLEND_MODE_PREMULTIPLIED,
// we generally work with pre-multiplied alpha
.srcColorBlendFactor = VK_BLEND_FACTOR_ONE,
.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,