More NVK Driver Improvements Merged For Mesa 24.3
([Nouveau] 6 Hours Ago
More MME)
- Reference: 0001486316
- News link: https://www.phoronix.com/news/NVK-More-MME-For-Mesa-24.3
- Source link:
Faith Ekstrand has merged another two dozen patches for the open-source NVIDIA "NVK" Vulkan driver with next quarter's Mesa 24.3.
Ekstrand's latest effort has been having the NVK driver use the MME (NVIDIA's Macro Method Expander) for more functionality. These two dozen patches for further making use of the MME is a stepping stone toward enabling [1]device generated commands support within the NVK driver.
Besides being a requirement in working toward the NVK DGC support, Ekstrand does note it may also make the driver a little faster:
"These might make the driver a little faster as it reduces state dirtying but that's not really the primary goal. The real here is to effectively split up the HW state. There are several HW states which depend on more than one piece of state. Sometimes that's fairly simple such as if it combines two dynamic states. However, sometimes it's much more complicated such as when some of the state comes from a shader and some comes from dynamic state or elsewhere. The big, crazy example of this is SET_HYBRID_ANTI_ALIAS_CONTROL and the sample masks which depend on both minSampleShading, which we get as a side-effect of the pipeline/shader compile and rasterizationSamples, which is a dynamic state. To make matters worse, this one nominally depends on floating-point math. Naturally, this macro is a little bit complicated, so...
This merge request also adds a simple unit testing framework to NVK which runs the macro against simulated state and checks that the methods emitted from the macro match an expected method/data array. This also makes it way easier to develop new macros because we can reliably test them and single-step through the simulator if needed. It also provides some sense of security because the unit tests run at compile time and against both the Fermi and Turing MME simulators."
See [2]this merge request for the latest tranche of NVK patches now merged for Mesa 24.3.
Also worth bringing up on the NVK side is [3]this open merge request since last week. That effort is around optimizing global state updates in the name of performance to reduce GPU stalling.
[1] https://www.phoronix.com/search/device+generated+commands
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596
Ekstrand's latest effort has been having the NVK driver use the MME (NVIDIA's Macro Method Expander) for more functionality. These two dozen patches for further making use of the MME is a stepping stone toward enabling [1]device generated commands support within the NVK driver.
Besides being a requirement in working toward the NVK DGC support, Ekstrand does note it may also make the driver a little faster:
"These might make the driver a little faster as it reduces state dirtying but that's not really the primary goal. The real here is to effectively split up the HW state. There are several HW states which depend on more than one piece of state. Sometimes that's fairly simple such as if it combines two dynamic states. However, sometimes it's much more complicated such as when some of the state comes from a shader and some comes from dynamic state or elsewhere. The big, crazy example of this is SET_HYBRID_ANTI_ALIAS_CONTROL and the sample masks which depend on both minSampleShading, which we get as a side-effect of the pipeline/shader compile and rasterizationSamples, which is a dynamic state. To make matters worse, this one nominally depends on floating-point math. Naturally, this macro is a little bit complicated, so...
This merge request also adds a simple unit testing framework to NVK which runs the macro against simulated state and checks that the methods emitted from the macro match an expected method/data array. This also makes it way easier to develop new macros because we can reliably test them and single-step through the simulator if needed. It also provides some sense of security because the unit tests run at compile time and against both the Fermi and Turing MME simulators."
See [2]this merge request for the latest tranche of NVK patches now merged for Mesa 24.3.
Also worth bringing up on the NVK side is [3]this open merge request since last week. That effort is around optimizing global state updates in the name of performance to reduce GPU stalling.
[1] https://www.phoronix.com/search/device+generated+commands
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596
phoronix