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 | |
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>
-rw-r--r-- | docs/features.txt | 2 | ||||
-rw-r--r-- | src/gallium/drivers/lima/lima_job.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/lima/lima_screen.c | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/docs/features.txt b/docs/features.txt index ba9d5778ac0..7c894a57c43 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -220,7 +220,7 @@ GL 4.5, GLSL 4.50 -- all DONE: nvc0, r600, radeonsi, llvmpipe, zink GL_ARB_direct_state_access DONE (all drivers) GL_ARB_get_texture_sub_image DONE (all drivers) GL_ARB_shader_texture_image_samples DONE (i965, nv50, virgl) - GL_ARB_texture_barrier DONE (freedreno, i965, nv50, vc4, virgl) + GL_ARB_texture_barrier DONE (freedreno, i965, nv50, vc4, virgl, lima) GL_KHR_context_flush_control DONE (all - but needs GLX/EGL extension to be useful) GL_KHR_robustness DONE (freedreno, i965, virgl) GL_EXT_shader_integer_mix DONE (all drivers that support GLSL) 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 */ |