panfrost: Make panfrost_batch_get_bifrost_tiler per-gen

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851>
This commit is contained in:
Alyssa Rosenzweig
2021-07-13 13:58:10 -04:00
committed by Marge Bot
parent 6f0c235da1
commit 058d4d3b3e
3 changed files with 29 additions and 31 deletions
@@ -2598,6 +2598,35 @@ panfrost_update_state_fs(struct panfrost_batch *batch)
panfrost_update_state_tex(batch, st);
}
#if PAN_ARCH >= 6
static mali_ptr
panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_count)
{
struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
if (!vertex_count)
return 0;
if (batch->tiler_ctx.bifrost)
return batch->tiler_ctx.bifrost;
struct panfrost_ptr t =
pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER_HEAP);
pan_emit_bifrost_tiler_heap(dev, t.cpu);
mali_ptr heap = t.gpu;
t = pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER);
pan_emit_bifrost_tiler(dev, batch->key.width, batch->key.height,
util_framebuffer_get_num_samples(&batch->key),
heap, t.cpu);
batch->tiler_ctx.bifrost = t.gpu;
return batch->tiler_ctx.bifrost;
}
#endif
#if PAN_ARCH >= 6
#define TILER_JOB BIFROST_TILER_JOB
#else
-28
View File
@@ -484,34 +484,6 @@ panfrost_batch_get_shared_memory(struct panfrost_batch *batch,
return batch->shared_memory;
}
mali_ptr
panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_count)
{
struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
assert(pan_is_bifrost(dev));
if (!vertex_count)
return 0;
if (batch->tiler_ctx.bifrost)
return batch->tiler_ctx.bifrost;
struct panfrost_ptr t =
pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER_HEAP);
pan_emit_bifrost_tiler_heap(dev, t.cpu);
mali_ptr heap = t.gpu;
t = pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER);
pan_emit_bifrost_tiler(dev, batch->key.width, batch->key.height,
util_framebuffer_get_num_samples(&batch->key),
heap, t.cpu);
batch->tiler_ctx.bifrost = t.gpu;
return batch->tiler_ctx.bifrost;
}
static void
panfrost_batch_to_fb_info(const struct panfrost_batch *batch,
struct pan_fb_info *fb,
-3
View File
@@ -208,7 +208,4 @@ panfrost_batch_intersection_scissor(struct panfrost_batch *batch,
unsigned minx, unsigned miny,
unsigned maxx, unsigned maxy);
mali_ptr
panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_count);
#endif