if (usage & PIPE_MAP_READ) {
zink_transfer_copy_bufimage(ctx, staging_res, res, trans);
+ /* TODO: remove for wsi */
+ struct zink_resource *scanout = NULL;
+ if (res->scanout_obj) {
+ scanout = ctx->flush_res;
+ ctx->flush_res = res;
+ }
/* need to wait for rendering to finish */
zink_fence_wait(pctx);
+ /* TODO: remove for wsi */
+ if (res->scanout_obj)
+ ctx->flush_res = scanout;
}
ptr = base = map_resource(screen, staging_res);
if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_READ))
resource_sync_reads(ctx, res);
if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_RW)) {
+ /* TODO: remove for wsi */
+ struct zink_resource *scanout = NULL;
+ if (res->scanout_obj) {
+ scanout = ctx->flush_res;
+ ctx->flush_res = res;
+ }
if (usage & PIPE_MAP_READ)
resource_sync_writes_from_batch_usage(ctx, res);
else
zink_fence_wait(pctx);
+ /* TODO: remove for wsi */
+ if (res->scanout_obj)
+ ctx->flush_res = scanout;
}
VkImageSubresource isr = {
res->aspect,