Rework pushbuf handling and implement secondaries
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:
- Rework on a new
nv_push
struct which contains the minimum needed for theP_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. - 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
- Slowly start removing
nouveau_ws_push
and instead hand-rolling it the few places where we need pushbufs outside command buffers. - 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. - Switch
nvk_cmd_buffer
to using BOs from the pool for uploads and pushbufs. - Implement secondaries
- 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.