panfrost: Pad compute jobs with zeros on v4
Apparently, Midgard GPUs don't like when the last 2 words of
compute/vertex jobs contain garbage. Extend the compute job definition
to include a padding section thus aligning the job on a 64-byte boundary,
and add the according pan_section_pack() calls where we have a
compute job filled.
Fixes: b76420be1f
("panfrost: Split command stream descriptor definitions per-gen")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10558
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Anton Bambura <jenneron@postmarketos.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27515>
This commit is contained in:

committed by
Marge Bot

parent
0bc26efdc4
commit
5b1b76e9cd
@@ -302,6 +302,11 @@ GENX(jm_launch_grid)(struct panfrost_batch *batch,
|
||||
cfg.textures = batch->textures[PIPE_SHADER_COMPUTE];
|
||||
cfg.samplers = batch->samplers[PIPE_SHADER_COMPUTE];
|
||||
}
|
||||
|
||||
#if PAN_ARCH == 4
|
||||
pan_section_pack(t.cpu, COMPUTE_JOB, COMPUTE_PADDING, cfg)
|
||||
;
|
||||
#endif
|
||||
#else
|
||||
struct panfrost_context *ctx = batch->ctx;
|
||||
struct panfrost_compiled_shader *cs = ctx->prog[PIPE_SHADER_COMPUTE];
|
||||
@@ -453,6 +458,11 @@ jm_emit_vertex_job(struct panfrost_batch *batch,
|
||||
|
||||
section = pan_section_ptr(job, COMPUTE_JOB, DRAW);
|
||||
jm_emit_vertex_draw(batch, section);
|
||||
|
||||
#if PAN_ARCH == 4
|
||||
pan_section_pack(job, COMPUTE_JOB, COMPUTE_PADDING, cfg)
|
||||
;
|
||||
#endif
|
||||
}
|
||||
#endif /* PAN_ARCH <= 7 */
|
||||
|
||||
|
@@ -979,12 +979,16 @@
|
||||
<field name="Job Task Split" size="4" start="0:26" type="uint"/>
|
||||
</struct>
|
||||
|
||||
<struct name="Compute Padding" size="2">
|
||||
</struct>
|
||||
|
||||
<!-- Compute job also covers vertex and geometry operations -->
|
||||
<aggregate name="Compute Job" align="64">
|
||||
<section name="Header" offset="0" type="Job Header"/>
|
||||
<section name="Invocation" offset="32" type="Invocation"/>
|
||||
<section name="Parameters" offset="40" type="Compute Job Parameters"/>
|
||||
<section name="Draw" offset="64" type="Draw"/>
|
||||
<section name="Compute padding" offset="184" type="Compute Padding"/>
|
||||
</aggregate>
|
||||
|
||||
<struct name="Primitive Size">
|
||||
|
Reference in New Issue
Block a user