panfrost: Fix the damage box clamping logic
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 31 Jan 2020 12:42:19 +0000 (13:42 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 3 Feb 2020 12:53:47 +0000 (12:53 +0000)
commitb550b7ef3b8d12f533b67b1a03159a127a3ff34a
treee4a1a5d41ebf5d94a9f1a9f6d5cecbe912eb5067
parent2b089e26bfe615cf616926cdddafd8439c835878
panfrost: Fix the damage box clamping logic

When the rendering are is not covering the whole FBO, and the biggest
damage rect is empty, we can have damage.max{x,y} > damage.min{x,y},
which leads to invalid reload boxes.

Fixes: 65ae86b85422 ("panfrost: Add support for KHR_partial_update()")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
src/gallium/drivers/panfrost/pan_job.c