Skip to content

WIP: anv: Use BINDING_TABLE_POOL_ALLOC instead of SBA on Gen11+

Faith Ekstrand requested to merge gfxstrand/mesa:review/anv-bt-pool-alloc into main

On Gen11, they dropped the resource streamer hardware but left one very useful bit lying around: 3DSTATE_BINDING_TABLE_POOL_ALLOC. Prior to Gen11, binding table pools implied hardware binding tables which implied using the resource streamer. On Gen11, however, binding table pools simply mean a separate base address for binding tables which is what we've wanted for Vulkan all along.

Now, instead of having to set surface state base address to the start of the binding table block and offset all of our surface states, we can set surface state base address to the start of the surface states and the binding table pool address to the start of the binding table block. This lets us emit STATE_BASE_ADDRESS once at context creation rather than having to re-emit it in every batch. While this shouldn't have any performance implications (we still have to stall), it definitely makes the driver a lot cleaner on Gen11+.

Merge request reports