mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
panvk/jm: Automatically open a batch in dispatch_precomp()
cmd_clear_afbc_metadata() might be called before any other job, and it's
assuming dispatch_precomp() doesn't fail in that case. We could
explicitly open the batch in cmd_clear_afbc_metadata(), but checking for
cur_batch==NULL and opening a new batch seems to be okay too, and it
allows us to not special case for v7 in cmd_clear_afbc_metadata().
Fixes: c95f899305 ("panvk: add a meta command for transitioning image layout")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158>
This commit is contained in:
parent
023972827a
commit
b2fabf1ffe
1 changed files with 5 additions and 0 deletions
|
|
@ -22,6 +22,11 @@ panvk_per_arch(dispatch_precomp)(struct panvk_precomp_ctx *ctx,
|
|||
size_t data_size)
|
||||
{
|
||||
struct panvk_cmd_buffer *cmdbuf = ctx->cmdbuf;
|
||||
|
||||
/* Make sure we have a batch opened to queue our COMPUTE job to. */
|
||||
if (!cmdbuf->cur_batch)
|
||||
panvk_per_arch(cmd_open_batch)(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->cur_batch;
|
||||
struct panvk_device *dev = to_panvk_device(cmdbuf->vk.base.device);
|
||||
const struct panvk_shader_variant *shader =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue