diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-13 07:19:27 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-13 11:13:48 -0700 |
commit | 0c56330361958a9fb600c6536d424cb8ddc53e6b (patch) | |
tree | 78dc3aee189a87bc612aa1f0348039212c191f44 /src/gallium/drivers | |
parent | 46daaca55e0dd230fc27922f473982130207a549 (diff) |
panfrost: Workaround bug in partial update implementation
We can't intersect with empty regions.
Fixes: 65ae86b8542 ("panfrost: Add support for KHR_partial_update()")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 8177f8917f3..da0afcd8ec7 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1389,10 +1389,15 @@ panfrost_draw_wallpaper(struct pipe_context *pipe) * KHR_partial_update() spec states that trying to render outside of * the damage region is "undefined behavior", so we should be safe. */ - panfrost_job_intersection_scissor(batch, rsrc->damage.extent.minx, - rsrc->damage.extent.miny, - rsrc->damage.extent.maxx, - rsrc->damage.extent.maxy); + unsigned damage_width = (rsrc->damage.extent.maxx - rsrc->damage.extent.minx); + unsigned damage_height = (rsrc->damage.extent.maxy - rsrc->damage.extent.miny); + + if (damage_width && damage_height) { + panfrost_job_intersection_scissor(batch, rsrc->damage.extent.minx, + rsrc->damage.extent.miny, + rsrc->damage.extent.maxx, + rsrc->damage.extent.maxy); + } /* FIXME: Looks like aligning on a tile is not enough, but * aligning on twice the tile size seems to works. We don't |