Skip to content

iris,anv: Properly set the URB deref block size on Gen12

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

  1. 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.

  1. If DS is last enabled shader then if the number of DS handles is less than 324, need to set per poly deref.

  2. 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:

  1. The first two patches just smash it to per-poly mode because it looks like that's probably safe all the time.
  2. 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.
  3. Finally, we make gen_get_urb_config compute the deref block size and plumb that into 3DSTATE_SF on all the drivers.

Merge request reports