iris: Use bo->mmap_mode in transfer map read check

The scenario we want to avoid is reading from WC or UC mappings,
so this is an easier to follow check.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10941>
This commit is contained in:
Kenneth Graunke 2021-05-26 20:13:26 -07:00 committed by Marge Bot
parent f62724ccac
commit ccfde5089e

View file

@ -2079,7 +2079,7 @@ iris_transfer_map(struct pipe_context *ctx,
*/
if (!map_would_stall &&
!isl_aux_usage_has_compression(res->aux.usage) &&
!((usage & PIPE_MAP_READ) && !res->bo->cache_coherent)) {
!((usage & PIPE_MAP_READ) && res->bo->mmap_mode != IRIS_MMAP_WB)) {
usage |= PIPE_MAP_DIRECTLY;
}
}