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> (cherry picked from commit5b1b76e9cd
)
This commit is contained in:

committed by
Eric Engestrom

parent
5d47094e47
commit
d5812cb30d
@@ -2634,7 +2634,7 @@
|
||||
"description": "panfrost: Pad compute jobs with zeros on v4",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "b76420be1f1f3a0ceb7808131b9c8aa8e970a415",
|
||||
"notes": null
|
||||
|
@@ -2801,6 +2801,11 @@ panfrost_draw_emit_vertex(struct panfrost_batch *batch,
|
||||
section = pan_section_ptr(job, COMPUTE_JOB, DRAW);
|
||||
panfrost_draw_emit_vertex_section(batch, vs_vary, varyings, attribs,
|
||||
attrib_bufs, section);
|
||||
|
||||
#if PAN_ARCH == 4
|
||||
pan_section_pack(job, COMPUTE_JOB, COMPUTE_PADDING, cfg)
|
||||
;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3822,6 +3827,11 @@ panfrost_launch_grid_on_batch(struct pipe_context *pipe,
|
||||
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_compiled_shader *cs = ctx->prog[PIPE_SHADER_COMPUTE];
|
||||
|
||||
|
@@ -992,12 +992,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