zink: use only the extents for buffer unmap flushes
flush_region is relative to the map, so passing in the offsets again breaks the flush (if the flush hook is implemented correctly) cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
This commit is contained in:
committed by
Marge Bot
parent
2645430b06
commit
28d23c9e26
@@ -2009,7 +2009,10 @@ transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
|
||||
struct zink_transfer *trans = (struct zink_transfer *)ptrans;
|
||||
|
||||
if (!(trans->base.b.usage & (PIPE_MAP_FLUSH_EXPLICIT | PIPE_MAP_COHERENT))) {
|
||||
zink_transfer_flush_region(pctx, ptrans, &ptrans->box);
|
||||
/* flush_region is relative to the mapped region: use only the extents */
|
||||
struct pipe_box box = ptrans->box;
|
||||
box.x = box.y = box.z = 0;
|
||||
zink_transfer_flush_region(pctx, ptrans, &box);
|
||||
}
|
||||
|
||||
if ((trans->base.b.usage & PIPE_MAP_PERSISTENT) && !(trans->base.b.usage & PIPE_MAP_COHERENT))
|
||||
|
||||
Reference in New Issue
Block a user