panfrost: Get rid of the non-native wallpering bits

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
This commit is contained in:
Boris Brezillon
2020-10-18 10:53:57 +02:00
committed by Marge Bot
parent c89f659f03
commit a33827d3d3
6 changed files with 0 additions and 81 deletions

View File

@@ -91,41 +91,3 @@ panfrost_blit(struct pipe_context *pipe,
return;
}
/* Blits a framebuffer to "itself". Mali is a tiler, so the
* framebuffer is implicitly cleared every frame, so if there is
* no actual glClear(), we have to blit it back ourselves.
*/
void
panfrost_blit_wallpaper(struct panfrost_context *ctx, struct pipe_box *box)
{
struct panfrost_batch *batch = ctx->wallpaper_batch;
struct pipe_blit_info binfo = {0};
panfrost_blitter_save(ctx, ctx->blitter_wallpaper);
struct pipe_surface *surf = batch->key.cbufs[0];
unsigned level = surf->u.tex.level;
unsigned layer = surf->u.tex.first_layer;
assert(surf->u.tex.last_layer == layer);
binfo.src.resource = binfo.dst.resource = batch->key.cbufs[0]->texture;
binfo.src.level = binfo.dst.level = level;
binfo.src.box.x = binfo.dst.box.x = box->x;
binfo.src.box.y = binfo.dst.box.y = box->y;
binfo.src.box.z = binfo.dst.box.z = layer;
binfo.src.box.width = binfo.dst.box.width = box->width;
binfo.src.box.height = binfo.dst.box.height = box->height;
binfo.src.box.depth = binfo.dst.box.depth = 1;
binfo.src.format = binfo.dst.format = batch->key.cbufs[0]->format;
assert(batch->key.nr_cbufs == 1);
binfo.mask = PIPE_MASK_RGBA;
binfo.filter = PIPE_TEX_FILTER_LINEAR;
binfo.scissor_enable = FALSE;
util_blitter_blit(ctx->blitter_wallpaper, &binfo);
}

View File

@@ -1825,18 +1825,6 @@ panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
const struct panfrost_ptr *tiler_job)
{
struct panfrost_context *ctx = batch->ctx;
bool wallpapering = ctx->wallpaper_batch && batch->scoreboard.tiler_dep;
if (wallpapering) {
/* Inject in reverse order, with "predicted" job indices.
* THIS IS A HACK XXX */
panfrost_add_job(&batch->pool, &batch->scoreboard, MALI_JOB_TYPE_TILER, false,
batch->scoreboard.job_index + 2, tiler_job, true);
panfrost_add_job(&batch->pool, &batch->scoreboard, MALI_JOB_TYPE_VERTEX, false, 0,
vertex_job, true);
return;
}
/* If rasterizer discard is enable, only submit the vertex */

View File

@@ -1309,9 +1309,6 @@ panfrost_destroy(struct pipe_context *pipe)
if (panfrost->blitter)
util_blitter_destroy(panfrost->blitter);
if (panfrost->blitter_wallpaper)
util_blitter_destroy(panfrost->blitter_wallpaper);
util_unreference_framebuffer_state(&panfrost->pipe_framebuffer);
u_upload_destroy(pipe->stream_uploader);
u_upload_destroy(panfrost->state_uploader);
@@ -1620,10 +1617,8 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
ctx->primconvert = util_primconvert_create(gallium, ctx->draw_modes);
ctx->blitter = util_blitter_create(gallium);
ctx->blitter_wallpaper = util_blitter_create(gallium);
assert(ctx->blitter);
assert(ctx->blitter_wallpaper);
/* Prepare for render! */

View File

@@ -162,15 +162,6 @@ struct panfrost_context {
struct primconvert_context *primconvert;
struct blitter_context *blitter;
/* Blitting the wallpaper (the old contents of the framebuffer back to
* itself) uses a dedicated u_blitter instance versus general blit()
* callbacks from Gallium, as the blit() callback can trigger
* wallpapering without Gallium realising, which in turns u_blitter
* errors due to unsupported reucrsion */
struct blitter_context *blitter_wallpaper;
struct panfrost_batch *wallpaper_batch;
struct panfrost_blend_state *blend;
struct pipe_viewport_state pipe_viewport;

View File

@@ -276,12 +276,6 @@ panfrost_get_batch(struct panfrost_context *ctx,
struct panfrost_batch *
panfrost_get_batch_for_fbo(struct panfrost_context *ctx)
{
/* If we're wallpapering, we special case to workaround
* u_blitter abuse */
if (ctx->wallpaper_batch)
return ctx->wallpaper_batch;
/* If we already began rendering, use that */
if (ctx->batch) {
@@ -548,13 +542,6 @@ panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo,
if (!(flags & PAN_BO_ACCESS_SHARED))
return;
/* All dependencies should have been flushed before we execute the
* wallpaper draw, so it should be harmless to skip the
* update_bo_access() call.
*/
if (batch == batch->ctx->wallpaper_batch)
return;
assert(flags & PAN_BO_ACCESS_RW);
panfrost_batch_update_bo_access(batch, bo, flags & PAN_BO_ACCESS_WRITE,
old_flags != 0);

View File

@@ -112,10 +112,6 @@ void
panfrost_blit(struct pipe_context *pipe,
const struct pipe_blit_info *info);
void
panfrost_blit_wallpaper(struct panfrost_context *ctx,
struct pipe_box *box);
void
panfrost_resource_set_damage_region(struct pipe_screen *screen,
struct pipe_resource *res,