Skip to content

anv: use 2 different buffers for surfaces/samplers in descriptor sets

What does this MR do and why?

We had the unfortunate finding on a recent platform to learn that the bindless sampler heap is not functioning as expected.

Nowhere in the documentation is the size of the heap written down. So most people assumed that's the max number that we can program (4Gb).

The reality is that it's only 64Mb.

Though it is appearing like it's working properly for the whole 4Gb range for most apps, this is only because the HW bounds checking applied is broken. Instead of clamping anything beyond 64Mb, it's only clamping the last 4Kb of each 64Mb region.

So this heap is useless for us to make a 4Gb region of both sampler & surface states...

This change essentially turns off the bindless sampler heap on DG2+.

The only location where we can put SAMPLER_STATE elements is the dynamic state heap. Unfortunately we cannot align the dynamic state heap with the bindless surface state heap. So the solution is to allocate sampler & surface states separately, each from the own heap in the descriptor pool.

We now have to provide 2 sets of offsets for surfaces & samplers.

Includes !25814 (merged) (ignore those patches, I'll remove them, just debugging helpers)

Edited by Lionel Landwerlin

Merge request reports