zink: never use staging buffer for unsynchronized buffer maps

this is ultra broken, do not attempt

Fixes: 6bfbce0447 ("zink: rework buffer mapping")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12111>
This commit is contained in:
Mike Blumenkrantz 2021-06-15 16:18:47 -04:00 committed by Marge Bot
parent 3d64a97cf6
commit 5ff0f4a901

View file

@ -1190,7 +1190,8 @@ buffer_transfer_map(struct zink_context *ctx, struct zink_resource *res, unsigne
/* At this point, the buffer is always idle (we checked it above). */
usage |= PIPE_MAP_UNSYNCHRONIZED;
}
} else if (((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) && res->base.b.usage != PIPE_USAGE_STAGING) || !res->obj->host_visible) {
} else if (!(usage & PIPE_MAP_UNSYNCHRONIZED) &&
(((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) && res->base.b.usage != PIPE_USAGE_STAGING) || !res->obj->host_visible)) {
assert(!(usage & (TC_TRANSFER_MAP_THREADED_UNSYNC | PIPE_MAP_THREAD_SAFE)));
if (!res->obj->host_visible || !(usage & PIPE_MAP_ONCE)) {
trans->offset = box->x % screen->info.props.limits.minMemoryMapAlignment;