aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_state.c
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2019-06-30 21:44:12 +0800
committerQiang Yu <[email protected]>2019-09-23 09:48:15 +0800
commitafbaed906d7ba89467b177e768c36f29d6053ad0 (patch)
tree2a7bfd5aa0f1cb3f34bf08f350feb4c3c4e487db /src/gallium/drivers/lima/lima_state.c
parent8278b236b05b2d2f04439e6bc12766315a95869b (diff)
lima: implement EGL_KHR_partial_update
This extension set a damage region for each buffer swap which can be used to reduce buffer reload cost by only feed damage region's tile buffer address for PP. Reviewed-and-Tested-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/lima_state.c')
-rw-r--r--src/gallium/drivers/lima/lima_state.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c
index fb3b36a4b2b..286529e9db0 100644
--- a/src/gallium/drivers/lima/lima_state.c
+++ b/src/gallium/drivers/lima/lima_state.c
@@ -414,50 +414,6 @@ lima_set_sampler_views(struct pipe_context *pctx,
ctx->dirty |= LIMA_CONTEXT_DIRTY_TEXTURES;
}
-UNUSED static bool
-lima_set_damage_region(struct pipe_context *pctx, unsigned num_rects, int *rects)
-{
- struct lima_context *ctx = lima_context(pctx);
- struct lima_damage_state *damage = &ctx->damage;
- int i;
-
- if (damage->region)
- ralloc_free(damage->region);
-
- if (!num_rects) {
- damage->region = NULL;
- damage->num_region = 0;
- return true;
- }
-
- damage->region = ralloc_size(ctx, sizeof(*damage->region) * num_rects);
- if (!damage->region) {
- damage->num_region = 0;
- return false;
- }
-
- for (i = 0; i < num_rects; i++) {
- struct pipe_scissor_state *r = damage->region + i;
- /* region in tile unit */
- r->minx = rects[i * 4] >> 4;
- r->miny = rects[i * 4 + 1] >> 4;
- r->maxx = (rects[i * 4] + rects[i * 4 + 2] + 0xf) >> 4;
- r->maxy = (rects[i * 4 + 1] + rects[i * 4 + 3] + 0xf) >> 4;
- }
-
- /* is region aligned to tiles? */
- damage->aligned = true;
- for (i = 0; i < num_rects * 4; i++) {
- if (rects[i] & 0xf) {
- damage->aligned = false;
- break;
- }
- }
-
- damage->num_region = num_rects;
- return true;
-}
-
static void
lima_set_sample_mask(struct pipe_context *pctx,
unsigned sample_mask)