Mesa (main): iris: Use bo->mmap_mode in transfer map read check
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 2 21:37:22 UTC 2021
Module: Mesa
Branch: main
Commit: ccfde5089ef37cbd94d0296908ad246d757b2285
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ccfde5089ef37cbd94d0296908ad246d757b2285
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed May 26 20:13:26 2021 -0700
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 at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10941>
---
src/gallium/drivers/iris/iris_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 4eae7ee849f..a0a7d87d9cb 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -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;
}
}
More information about the mesa-commit
mailing list