Control: forwarded 1115160 https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3981 Control: tags 1115160 + patch
On Sat 2025-09-13 14:13:30 -0400, Daniel Kahn Gillmor wrote: > ``` > sway: render/pass.c:23: wlr_render_pass_add_texture: Assertion `box->x >= 0 > && box->y >= 0 && box->x + box->width <= options->texture->width && box->y + > box->height <= options->texture->height' failed. > ``` This looks like it's the upstream bug i've lined to above. The fix also appears to be upstream already, as noted in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5080. I've attached a cherry-picked version of the patch here. I'm testing it on my system, and haven't noticed any problems yet. --dkg
From: DreamMaoMao <[email protected]> Date: Thu, 29 May 2025 17:38:32 +0800 Subject: render/pass: Ensure the precision is consistent during comparison (cherry picked from commit a08acfcee0261ae9b084c217dd70dd52eea2904a) --- render/pass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render/pass.c b/render/pass.c index 9022282..23bdf96 100644 --- a/render/pass.c +++ b/render/pass.c @@ -21,8 +21,8 @@ void wlr_render_pass_add_texture(struct wlr_render_pass *render_pass, if (!wlr_fbox_empty(&options->src_box)) { const struct wlr_fbox *box = &options->src_box; assert(box->x >= 0 && box->y >= 0 && - box->x + box->width <= options->texture->width && - box->y + box->height <= options->texture->height); + (uint32_t)(box->x + box->width) <= options->texture->width && + (uint32_t)(box->y + box->height) <= options->texture->height); } render_pass->impl->add_texture(render_pass, options);
signature.asc
Description: PGP signature

