Skip to content

Add multi submit support

Qiang Yu requested to merge yuq825/mesa:topic/fb-job into master

Currently lima only has single submit which flush commands pending when switch framebuffer. This MR add multi submit support which save the information for submit when switch framebuffer and resume when switch back. Saved submit will be flushed to kernel when:

  1. other submit read/write its render target or write its texture
  2. CPU read/write its buffers
  3. user do explicit flush like glFLush.

This mainly benefits application which needs to manage multi FBO like xserver and wayland compositor by reducing flush-reload costs when switching between FBOs.

This is a big MR and I try to split every operation for the ease of review. I can also split this MR into multi MRs if needed.

Tested with some desktop applications on Mali400, no Mali450 yet, will do more and need your test too.

Mainly reference VC4 driver implementation.

v2:

  1. see commits marked with "v2"
  2. remove the lima_ctx_buff use lima_submit_create_stream_bo commit
  3. add two new commits for dump and rename lima_submit to lima_job

v3:

  1. add one commit to fix the texture bo is not added to submit

v4:

  1. see commits marked with "v3"

v5:

  1. add commit "lima: add missing resolve check for damage and reload"

v6:

  1. remove pass test
Edited by Qiang Yu

Merge request reports