diff --git a/.pick_status.json b/.pick_status.json index 24a371b02b7..3905114c077 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3370,7 +3370,7 @@ "description": "zink: check for cached mem correctly when mapping buffer", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "52f27cda05b9ff2eb93cbaf1cfae15198ed5a3d6" }, diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 378fead8e94..012f3ac53eb 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -1930,7 +1930,7 @@ zink_buffer_map(struct pipe_context *pctx, usage |= PIPE_MAP_UNSYNCHRONIZED; } else if (!(usage & PIPE_MAP_UNSYNCHRONIZED) && (((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) && - ((res->obj->bo->base.placement & VK_STAGING_RAM) != VK_STAGING_RAM)) || + ((screen->info.mem_props.memoryTypes[res->obj->bo->base.placement].propertyFlags & VK_STAGING_RAM) != VK_STAGING_RAM)) || !res->obj->host_visible)) { /* the above conditional catches uncached reads and non-HV writes */ assert(!(usage & (TC_TRANSFER_MAP_THREADED_UNSYNC)));