Mesa (main): iris: Assert on mapping a tiled buffer without MAP_RAW

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 2 21:37:21 UTC 2021


Module: Mesa
Branch: main
Commit: 05a43d426fd384ec21505019e5f627eca72c341e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05a43d426fd384ec21505019e5f627eca72c341e

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu May 20 00:46:30 2021 -0700

iris: Assert on mapping a tiled buffer without MAP_RAW

iris has never relied on detiled maps using hardware fences.
This code is a remnant of i965, where that was actually used.

We can just assert that callers don't do such a thing.

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_bufmgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index a403c8d0119..605326dceaf 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1224,8 +1224,7 @@ void *
 iris_bo_map(struct pipe_debug_callback *dbg,
             struct iris_bo *bo, unsigned flags)
 {
-   if (bo->tiling_mode != I915_TILING_NONE && !(flags & MAP_RAW))
-      return iris_bo_map_gtt(dbg, bo, flags);
+   assert((flags & MAP_RAW) || bo->tiling_mode == I915_TILING_NONE);
 
    void *map;
 



More information about the mesa-commit mailing list