render/vulkan: Fix draw rect clip region invalid in blend none mod

This commit is contained in:
chenyongxing 2024-07-16 14:24:46 +08:00
parent 7550e483ae
commit 015bb8512e

View File

@ -572,16 +572,10 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass,
}, },
}; };
VkClearRect clear_rect = { VkClearRect clear_rect = {
.rect = {
.offset = { box.x, box.y },
.extent = { box.width, box.height },
},
.layerCount = 1, .layerCount = 1,
}; };
for (int i = 0; i < clip_rects_len; i++) { for (int i = 0; i < clip_rects_len; i++) {
VkRect2D rect; convert_pixman_box_to_vk_rect(&clip_rects[i], &clear_rect.rect);
convert_pixman_box_to_vk_rect(&clip_rects[i], &rect);
vkCmdSetScissor(cb, 0, 1, &rect);
vkCmdClearAttachments(cb, 1, &clear_att, 1, &clear_rect); vkCmdClearAttachments(cb, 1, &clear_att, 1, &clear_rect);
} }
break; break;