OSDN Git Service

panfrost: Make sure we reset the damage region of RTs at flush time
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 14 Nov 2019 08:35:27 +0000 (09:35 +0100)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 3 Dec 2019 18:23:35 +0000 (10:23 -0800)
commit8e3c4caf74d6f625498791cd9b5051dffa5282a0
tree4d85b3320c59c892dcf82f7d27e30ae889bc54cc
parente11d9cd9ed367f6cb2412f2d0f244bb920c6a0f8
panfrost: Make sure we reset the damage region of RTs at flush time

We must reset the damage info of our render targets here even though a
damage reset normally happens when the DRI layer swaps buffers. That's
because there can be implicit flushes the GL app is not aware of, and
those might impact the damage region: if part of the damaged portion
is drawn during those implicit flushes, you have to reload those areas
before next draws are pushed, and since the driver can't easily know
what's been modified by the draws it flushed, the easiest solution is
to reload everything.

Reported-by: Carsten Haitzler <raster@rasterman.com>
Fixes: 65ae86b85422 ("panfrost: Add support for KHR_partial_update()")
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
(cherry picked from commit c6e2096c47f05aab6807325799bf0b6a4092084d)
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_resource.h