v3dv: add the concept of a job

Graphics / Mesa 3D Graphics Library / Mesa - Iago Toral Quiroga [igalia.com] - 13 October 2020 21:21 UTC

As we make progress towards more complex submissions we will need to split our command buffers into smaller executable units (jobs) that we can submit indepdently to the kernel. This will be required to implement pipeline barriers, split subpasses that have depedencies on previous subpasses, split render passes that use more than 4 render targets, etc.

For now we keep things simple and we only keep one job as current recording target in the command buffer, and we generate a new one with every subpass or with any commands we see outside of a render pass (only vkCopyImageToBuffer for now). In the future we probably want to optimize this by merging subpasses into the same job when possible, etc.


5259175fe86 v3dv: add the concept of a job
src/broadcom/vulkan/v3dv_cl.c | 24 +--
src/broadcom/vulkan/v3dv_cl.h | 10 +-
src/broadcom/vulkan/v3dv_cmd_buffer.c | 386 +++++++++++++++++++++-------------
src/broadcom/vulkan/v3dv_meta_copy.c | 76 +++----
src/broadcom/vulkan/v3dv_private.h | 46 ++--
src/broadcom/vulkan/v3dv_queue.c | 70 +++---
src/broadcom/vulkan/v3dv_uniforms.c | 13 +-
7 files changed, 369 insertions(+), 256 deletions(-)

Upstream: cgit.freedesktop.org

  • Share