diff options
author | Vasily Khoruzhick <anarsoul@gmail.com> | 2022-05-22 14:13:45 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-05-23 21:08:49 +0000 |
commit | 73851e3f4472f5ab18261a7d7277ee6001f9a227 (patch) | |
tree | 3f866c3a456c422d7435fd915bd2ebeb55c6ca97 /src/gallium/drivers | |
parent | ee2278de654853f1d6107e6ef6fc8537a668866e (diff) |
lima: Implement texture_barrier
Improves x11perf -copywinwin100 from ~1520/sec to ~3700/sec
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16658>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/lima/lima_job.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/lima/lima_screen.c | 1 |
2 files changed, 10 insertions, 0 deletions
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 */ |