There is a programming note in the BSpec for 3DSTATE_SF_BODY::"Deref BLock Size" which says:
Deref Block size depends on the last enabled shader and number of handles programmed for that shader
- For GS last shader enabled cases, the deref block is always set to a per poly(within hardware)
If the last enabled shader is VS or DS.
If DS is last enabled shader then if the number of DS handles is less than 324, need to set per poly deref.
If VS is last enabled shader then if the number of VS handles is less than 192, need to set per poly deref
This MR attempts to implement this programming restriction. In order to do so, we have to do an annoying amount of re-plumbing because this effectively moves a bit of URB config into 3DSTATE_SF:
- The first two patches just smash it to per-poly mode because it looks like that's probably safe all the time.
- Next is a bit of general code refactoring to clean some things up and get us to the point where BLORP is emitting its own URB config.
- Finally, we make
gen_get_urb_configcompute the deref block size and plumb that into 3DSTATE_SF on all the drivers.