mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 01:20:44 +02:00
panvk: Make panvk_cmd_open_batch() return the new batch
So we can get replace the panvk_cmd_open_batch(); batch = cmdbuf->state.batch; sequence by batch = panvk_cmd_open_batch(); Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>
This commit is contained in:
parent
28bd417e3d
commit
8fb22d28d8
5 changed files with 11 additions and 21 deletions
|
|
@ -478,7 +478,7 @@ panvk_cmd_preload_fb_after_batch_split(struct panvk_cmd_buffer *cmdbuf)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
struct panvk_batch *
|
||||
panvk_cmd_open_batch(struct panvk_cmd_buffer *cmdbuf)
|
||||
{
|
||||
assert(!cmdbuf->state.batch);
|
||||
|
|
@ -486,6 +486,7 @@ panvk_cmd_open_batch(struct panvk_cmd_buffer *cmdbuf)
|
|||
sizeof(*cmdbuf->state.batch), 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
|
||||
assert(cmdbuf->state.batch);
|
||||
return cmdbuf->state.batch;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ struct panvk_cmd_buffer {
|
|||
VkResult record_result;
|
||||
};
|
||||
|
||||
void
|
||||
struct panvk_batch *
|
||||
panvk_cmd_open_batch(struct panvk_cmd_buffer *cmdbuf);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -703,8 +703,7 @@ panvk_per_arch(CmdDraw)(VkCommandBuffer commandBuffer,
|
|||
if (batch->scoreboard.job_index >= (UINT16_MAX - 3)) {
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_preload_fb_after_batch_split(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
batch = cmdbuf->state.batch;
|
||||
batch = panvk_cmd_open_batch(cmdbuf);
|
||||
}
|
||||
|
||||
if (cmdbuf->state.pipeline->fs.required)
|
||||
|
|
|
|||
|
|
@ -107,9 +107,7 @@ panvk_meta_blit(struct panvk_cmd_buffer *cmdbuf,
|
|||
if (ctx.dst.cur_layer < 0)
|
||||
continue;
|
||||
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
mali_ptr tsd, tiler;
|
||||
|
||||
views[0].first_layer = views[0].last_layer = ctx.dst.cur_layer;
|
||||
|
|
|
|||
|
|
@ -769,9 +769,7 @@ panvk_meta_copy_img2img(struct panvk_cmd_buffer *cmdbuf,
|
|||
pan_pool_upload_aligned(&cmdbuf->desc_pool.base, src_rect,
|
||||
sizeof(src_rect), 64);
|
||||
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
dstview.first_layer = dstview.last_layer = l + first_dst_layer;
|
||||
batch->blit.src = src->pimage.data.bo;
|
||||
|
|
@ -1218,9 +1216,7 @@ panvk_meta_copy_buf2img(struct panvk_cmd_buffer *cmdbuf,
|
|||
pan_pool_upload_aligned(&cmdbuf->desc_pool.base, src_rect,
|
||||
sizeof(src_rect), 64);
|
||||
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
view.first_layer = view.last_layer = l + first_layer;
|
||||
batch->blit.src = buf->bo;
|
||||
|
|
@ -1650,9 +1646,8 @@ panvk_meta_copy_img2buf(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_meta_copy_img_emit_sampler(pdev, &cmdbuf->desc_pool.base);
|
||||
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct pan_tls_info tlsinfo = { 0 };
|
||||
|
||||
|
|
@ -1864,9 +1859,8 @@ panvk_meta_copy_buf2buf(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_meta_copy_emit_ubo(pdev, &cmdbuf->desc_pool.base, &info, sizeof(info));
|
||||
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
panvk_per_arch(cmd_alloc_tls_desc)(cmdbuf, false);
|
||||
|
||||
|
|
@ -2034,9 +2028,8 @@ panvk_meta_fill_buf(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_meta_copy_emit_ubo(pdev, &cmdbuf->desc_pool.base, &info, sizeof(info));
|
||||
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
panvk_per_arch(cmd_alloc_tls_desc)(cmdbuf, false);
|
||||
|
||||
|
|
@ -2095,9 +2088,8 @@ panvk_meta_update_buf(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_meta_copy_emit_ubo(pdev, &cmdbuf->desc_pool.base, &info, sizeof(info));
|
||||
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
struct panvk_batch *batch = cmdbuf->state.batch;
|
||||
struct panvk_batch *batch = panvk_cmd_open_batch(cmdbuf);
|
||||
|
||||
panvk_per_arch(cmd_alloc_tls_desc)(cmdbuf, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue