mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render: ensure wlr_render_rect_options->box is nonempty
This optimization also fixes an validation error with the Vulkan renderer by ensuring vkCmdClearAttachments does not receive empty regions.
This commit is contained in:
parent
e5fc8cd4c7
commit
a94168b5fe
2 changed files with 4 additions and 0 deletions
|
|
@ -40,6 +40,9 @@ void wlr_render_pass_add_texture(struct wlr_render_pass *render_pass,
|
|||
|
||||
void wlr_render_pass_add_rect(struct wlr_render_pass *render_pass,
|
||||
const struct wlr_render_rect_options *options) {
|
||||
if (wlr_box_empty(&options->box)) {
|
||||
return;
|
||||
}
|
||||
render_pass->impl->add_rect(render_pass, options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue