Module: Mesa Branch: main Commit: 726603f779209555c443e4d6cb02a57f93d5fd0f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=726603f779209555c443e4d6cb02a57f93d5fd0f
Author: Alyssa Rosenzweig <[email protected]> Date: Tue Nov 8 16:19:47 2022 -0500 asahi: Set data_valid with PERSISTENT or COHERENT We won't get an unmap/flush but we could have had data already. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19606> --- src/gallium/drivers/asahi/agx_pipe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 0bedba6191c..5f12c4f3b9f 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -582,9 +582,11 @@ agx_transfer_map(struct pipe_context *pctx, transfer->base.layer_stride = rsrc->layout.layer_stride_B; /* Be conservative for direct writes */ - - if ((usage & PIPE_MAP_WRITE) && (usage & PIPE_MAP_DIRECTLY)) + if ((usage & PIPE_MAP_WRITE) && + (usage & (PIPE_MAP_DIRECTLY | PIPE_MAP_PERSISTENT | PIPE_MAP_COHERENT))) + { BITSET_SET(rsrc->data_valid, level); + } uint32_t offset = ail_get_linear_pixel_B(&rsrc->layout, level, box->x, box->y, box->z);
