Mesa (master): lima: add debug flag to disable tiling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 10 01:36:29 UTC 2020


Module: Mesa
Branch: master
Commit: 044da65f52b1de20fce608f83a6313c86d62b5b8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=044da65f52b1de20fce608f83a6313c86d62b5b8

Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date:   Mon Dec  9 18:29:19 2019 -0800

lima: add debug flag to disable tiling

Add debug flag to disable tiling. Note that it prevents lima from creating
tiled buffers, but it's still able to import them if modifier is specified

Reviewed-by: Andreas Baierl <ichgeh at imkreisrum.de>
Reviewed-by: Erico Nunes <nunes.erico at gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>

---

 src/gallium/drivers/lima/lima_resource.c | 2 +-
 src/gallium/drivers/lima/lima_screen.c   | 2 ++
 src/gallium/drivers/lima/lima_screen.h   | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c
index db116d06a83..27853417852 100644
--- a/src/gallium/drivers/lima/lima_resource.c
+++ b/src/gallium/drivers/lima/lima_resource.c
@@ -178,7 +178,7 @@ _lima_resource_create_with_modifiers(struct pipe_screen *pscreen,
                                      int count)
 {
    struct lima_screen *screen = lima_screen(pscreen);
-   bool should_tile = true;
+   bool should_tile = lima_debug & LIMA_DEBUG_NO_TILING ? false : true;
    unsigned width, height;
    bool should_align_dimensions;
    bool has_user_modifiers = true;
diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c
index 9610018115d..5d2696e4866 100644
--- a/src/gallium/drivers/lima/lima_screen.c
+++ b/src/gallium/drivers/lima/lima_screen.c
@@ -447,6 +447,8 @@ static const struct debug_named_value debug_options[] = {
           "disable BO cache" },
         { "bocache", LIMA_DEBUG_BO_CACHE,
           "print debug info for BO cache" },
+        { "notiling", LIMA_DEBUG_NO_TILING,
+          "don't use tiled buffers" },
         { NULL }
 };
 
diff --git a/src/gallium/drivers/lima/lima_screen.h b/src/gallium/drivers/lima/lima_screen.h
index 426f8e956c1..b75096bf983 100644
--- a/src/gallium/drivers/lima/lima_screen.h
+++ b/src/gallium/drivers/lima/lima_screen.h
@@ -39,6 +39,7 @@
 #define LIMA_DEBUG_SHADERDB       (1 << 3)
 #define LIMA_DEBUG_NO_BO_CACHE    (1 << 4)
 #define LIMA_DEBUG_BO_CACHE       (1 << 5)
+#define LIMA_DEBUG_NO_TILING      (1 << 6)
 
 extern uint32_t lima_debug;
 extern int lima_ctx_num_plb;




More information about the mesa-commit mailing list