panfrost: Make panfrost_scoreboard_initialize_tiler() return the job pointer
In the vulkan driver we need to patch job headers when re-submitting an already submitted batch. Change panfrost_scoreboard_initialize_tiler() prototype to allow that. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11139>
This commit is contained in:
parent
6d2ed635c3
commit
773bc1188b
|
@ -189,20 +189,21 @@ panfrost_add_job(
|
||||||
/* Generates a write value job, used to initialize the tiler structures. Note
|
/* Generates a write value job, used to initialize the tiler structures. Note
|
||||||
* this is called right before frame submission. */
|
* this is called right before frame submission. */
|
||||||
|
|
||||||
void
|
struct panfrost_ptr
|
||||||
panfrost_scoreboard_initialize_tiler(struct pan_pool *pool,
|
panfrost_scoreboard_initialize_tiler(struct pan_pool *pool,
|
||||||
struct pan_scoreboard *scoreboard,
|
struct pan_scoreboard *scoreboard,
|
||||||
mali_ptr polygon_list)
|
mali_ptr polygon_list)
|
||||||
{
|
{
|
||||||
|
struct panfrost_ptr transfer = { 0 };
|
||||||
|
|
||||||
/* Check if we even need tiling */
|
/* Check if we even need tiling */
|
||||||
if (pan_is_bifrost(pool->dev) || !scoreboard->first_tiler)
|
if (pan_is_bifrost(pool->dev) || !scoreboard->first_tiler)
|
||||||
return;
|
return transfer;
|
||||||
|
|
||||||
/* Okay, we do. Let's generate it. We'll need the job's polygon list
|
/* Okay, we do. Let's generate it. We'll need the job's polygon list
|
||||||
* regardless of size. */
|
* regardless of size. */
|
||||||
|
|
||||||
struct panfrost_ptr transfer =
|
transfer = panfrost_pool_alloc_aligned(pool,
|
||||||
panfrost_pool_alloc_aligned(pool,
|
|
||||||
MALI_WRITE_VALUE_JOB_LENGTH,
|
MALI_WRITE_VALUE_JOB_LENGTH,
|
||||||
64);
|
64);
|
||||||
|
|
||||||
|
@ -218,4 +219,5 @@ panfrost_scoreboard_initialize_tiler(struct pan_pool *pool,
|
||||||
}
|
}
|
||||||
|
|
||||||
scoreboard->first_job = transfer.gpu;
|
scoreboard->first_job = transfer.gpu;
|
||||||
|
return transfer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ panfrost_add_job(
|
||||||
const struct panfrost_ptr *job,
|
const struct panfrost_ptr *job,
|
||||||
bool inject);
|
bool inject);
|
||||||
|
|
||||||
void panfrost_scoreboard_initialize_tiler(
|
struct panfrost_ptr
|
||||||
struct pan_pool *pool,
|
panfrost_scoreboard_initialize_tiler(struct pan_pool *pool,
|
||||||
struct pan_scoreboard *scoreboard,
|
struct pan_scoreboard *scoreboard,
|
||||||
mali_ptr polygon_list);
|
mali_ptr polygon_list);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue