mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 10:10:14 +01:00
panfrost: Add the BO containing fragment program descriptor to the batch
On pre-Valhall HW, the fragment shader metadata was part of the RSD
(renderer state descriptor), which was emitted at draw time, but
Valhall introduces a shader program descriptor containing only the
shader information, and this one is emitted at shader preparation
time.
If we don't add the FS state BO to batch, we might end up with a batch
being executed after the shader object has been destroyed, leading to
page faults when the GPU tries to access the shader program descriptor.
We make the panfrost_batch_add_bo() unconditional since it gracefully
handles the NULL case (which will happen on v7-).
Fixes: 087b63cb07 ("panfrost: Allow uploading fragment SPDs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
This commit is contained in:
parent
31b039d8b7
commit
2cc317763c
1 changed files with 1 additions and 0 deletions
|
|
@ -646,6 +646,7 @@ panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
|
|||
struct panfrost_compiled_shader *ss = ctx->prog[PIPE_SHADER_FRAGMENT];
|
||||
|
||||
panfrost_batch_add_bo(batch, ss->bin.bo, PIPE_SHADER_FRAGMENT);
|
||||
panfrost_batch_add_bo(batch, ss->state.bo, PIPE_SHADER_FRAGMENT);
|
||||
|
||||
struct panfrost_ptr xfer;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue