From 015bb8512ee314e1deb858cf7350b0220fc58702 Mon Sep 17 00:00:00 2001 From: chenyongxing Date: Tue, 16 Jul 2024 14:24:46 +0800 Subject: [PATCH] render/vulkan: Fix draw rect clip region invalid in blend none mod --- render/vulkan/pass.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c index c879b71c..3697dcda 100644 --- a/render/vulkan/pass.c +++ b/render/vulkan/pass.c @@ -572,16 +572,10 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass, }, }; VkClearRect clear_rect = { - .rect = { - .offset = { box.x, box.y }, - .extent = { box.width, box.height }, - }, .layerCount = 1, }; for (int i = 0; i < clip_rects_len; i++) { - VkRect2D rect; - convert_pixman_box_to_vk_rect(&clip_rects[i], &rect); - vkCmdSetScissor(cb, 0, 1, &rect); + convert_pixman_box_to_vk_rect(&clip_rects[i], &clear_rect.rect); vkCmdClearAttachments(cb, 1, &clear_att, 1, &clear_rect); } break;