summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2020-02-07 20:32:51 +0800
committerMarge Bot <[email protected]>2020-02-17 02:54:15 +0000
commit5502bc83b0e4d4542bc5234fe6592db575658356 (patch)
tree96ee036c01fd63988755f597a0edd68e55f1dfc0 /src/gallium/drivers
parent131c50569066152a8e90b948b0873b990d748e98 (diff)
lima: enable multi submit optimization
Also provide a debug option to disable it. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/lima/lima_screen.c2
-rw-r--r--src/gallium/drivers/lima/lima_screen.h1
-rw-r--r--src/gallium/drivers/lima/lima_state.c5
3 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c
index 9f283297857..82d99a5e679 100644
--- a/src/gallium/drivers/lima/lima_screen.c
+++ b/src/gallium/drivers/lima/lima_screen.c
@@ -466,6 +466,8 @@ static const struct debug_named_value debug_options[] = {
"don't use tiled buffers" },
{ "nogrowheap", LIMA_DEBUG_NO_GROW_HEAP,
"disable growable heap buffer" },
+ { "singlesubmit", LIMA_DEBUG_SINGLE_SUBMIT,
+ "disable multi submit optimization" },
{ NULL }
};
diff --git a/src/gallium/drivers/lima/lima_screen.h b/src/gallium/drivers/lima/lima_screen.h
index fd6ec4e368f..e3cd40112c4 100644
--- a/src/gallium/drivers/lima/lima_screen.h
+++ b/src/gallium/drivers/lima/lima_screen.h
@@ -41,6 +41,7 @@
#define LIMA_DEBUG_BO_CACHE (1 << 5)
#define LIMA_DEBUG_NO_TILING (1 << 6)
#define LIMA_DEBUG_NO_GROW_HEAP (1 << 7)
+#define LIMA_DEBUG_SINGLE_SUBMIT (1 << 8)
extern uint32_t lima_debug;
extern int lima_ctx_num_plb;
diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c
index 45795249a39..2b48a3a124c 100644
--- a/src/gallium/drivers/lima/lima_state.c
+++ b/src/gallium/drivers/lima/lima_state.c
@@ -41,8 +41,9 @@ lima_set_framebuffer_state(struct pipe_context *pctx,
{
struct lima_context *ctx = lima_context(pctx);
- /* submit need framebuffer info, flush before change it */
- lima_flush(ctx);
+ /* make sure there are always single submit in this context */
+ if (lima_debug & LIMA_DEBUG_SINGLE_SUBMIT)
+ lima_flush(ctx);
struct lima_context_framebuffer *fb = &ctx->framebuffer;