From 73851e3f4472f5ab18261a7d7277ee6001f9a227 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sun, 22 May 2022 14:13:45 -0700 Subject: lima: Implement texture_barrier Improves x11perf -copywinwin100 from ~1520/sec to ~3700/sec Reviewed-by: Qiang Yu Reviewed-by: Erico Nunes Signed-off-by: Vasily Khoruzhick Part-of: --- src/gallium/drivers/lima/lima_job.c | 9 +++++++++ src/gallium/drivers/lima/lima_screen.c | 1 + 2 files changed, 10 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/lima/lima_job.c b/src/gallium/drivers/lima/lima_job.c index 3ec53db2d2a..14f52da4c7e 100644 --- a/src/gallium/drivers/lima/lima_job.c +++ b/src/gallium/drivers/lima/lima_job.c @@ -1112,6 +1112,14 @@ lima_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, } } +static void +lima_texture_barrier(struct pipe_context *pctx, unsigned flags) +{ + struct lima_context *ctx = lima_context(pctx); + + lima_flush(ctx); +} + static bool lima_job_compare(const void *s1, const void *s2) { @@ -1146,6 +1154,7 @@ bool lima_job_init(struct lima_context *ctx) } ctx->base.flush = lima_pipe_flush; + ctx->base.texture_barrier = lima_texture_barrier; return true; } diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c index 6215b2bc7e9..a04cf0c6373 100644 --- a/src/gallium/drivers/lima/lima_screen.c +++ b/src/gallium/drivers/lima/lima_screen.c @@ -106,6 +106,7 @@ lima_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD: case PIPE_CAP_TEXTURE_SWIZZLE: case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: + case PIPE_CAP_TEXTURE_BARRIER: return 1; /* Unimplemented, but for exporting OpenGL 2.0 */ -- cgit v1.2.3