panfrost: Move the JM-specific bits out of emit_fragment_job()
Add a jm_emit_fragment_job() helper that does the fragment job emission so we can re-use the rest of emit_fragment_job() for CSF too. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26249>
This commit is contained in:
committed by
Marge Bot
parent
04f4c39a4e
commit
e25b8d07b8
@@ -2638,6 +2638,17 @@ panfrost_initialize_surface(struct panfrost_batch *batch,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
jm_emit_fragment_job(struct panfrost_batch *batch,
|
||||
const struct pan_fb_info *pfb)
|
||||
{
|
||||
struct panfrost_ptr transfer =
|
||||
pan_pool_alloc_desc(&batch->pool.base, FRAGMENT_JOB);
|
||||
|
||||
GENX(pan_emit_fragment_job)(pfb, batch->framebuffer.gpu, transfer.cpu);
|
||||
batch->jm.jobs.frag = transfer.gpu;
|
||||
}
|
||||
|
||||
/* Generate a fragment job. This should be called once per frame. (Usually,
|
||||
* this corresponds to eglSwapBuffers or one of glFlush, glFinish)
|
||||
*/
|
||||
@@ -2674,11 +2685,7 @@ emit_fragment_job(struct panfrost_batch *batch, const struct pan_fb_info *pfb)
|
||||
assert(batch->maxx > batch->minx);
|
||||
assert(batch->maxy > batch->miny);
|
||||
|
||||
struct panfrost_ptr transfer =
|
||||
pan_pool_alloc_desc(&batch->pool.base, FRAGMENT_JOB);
|
||||
|
||||
GENX(pan_emit_fragment_job)(pfb, batch->framebuffer.gpu, transfer.cpu);
|
||||
batch->jm.jobs.frag = transfer.gpu;
|
||||
jm_emit_fragment_job(batch, pfb);
|
||||
}
|
||||
|
||||
#define DEFINE_CASE(c) \
|
||||
|
||||
Reference in New Issue
Block a user