Skip to content

Rework pushbuf handling and implement secondaries

Faith Ekstrand requested to merge gfxstrand/mesa:nvk/secondaries into nouveau/vk

This MR is a big ol' rework of everything having to do with pushbufs with the end result that we implement secondaries and entirely delete nouveau_ws_push. Roughly, it's got the following major components:

  1. Rework on a new nv_push struct which contains the minimum needed for the P_FOO functions/macros but doesn't contain a BO. Among other things, this means we can use those helpers in graphics pipelines without the the weird CPU pushbuf hack.
  2. Unabstract submit so the ioctl is now called directly by nvk. This allows us to more directly control how the push is constructed, what BOs are referenced, etc. The whole submit path in NVK makes a lot more sense now. We can also submit a piles of command buffers with a single ioctl
  3. Slowly start removing nouveau_ws_push and instead hand-rolling it the few places where we need pushbufs outside command buffers.
  4. Build a BO recycling mechanism for nvk_cmd_pool so we aren't invoking ioctls to allocate BOs constantly, as long as the app actually uses pools properly.
  5. Switch nvk_cmd_buffer to using BOs from the pool for uploads and pushbufs.
  6. Implement secondaries
  7. Now that we're not using it anymore, delete nouveau_ws_push.

Along with the above, this MR also contains some refactoring that will make supporting multiple kernel APIs/drivers or even operating systems easier because the drm_nouveau stuff is split out in a separate file. Yes, it's a very different way of abstracting than the RADV winsys concept but I don't think the RADV winsys concept has really worked out all that well in practice.

Edited by Faith Ekstrand

Merge request reports

Loading