ir3: Switch tess lowering to use location

Graphics / Mesa 3D Graphics Library / Mesa - Connor Abbott [gmail.com] - 23 October 2020 11:09 UTC

Clip & cull distances, which are compact arrays, exposed a lot of holes because they can take up multiple slots and partially overlap.

I wanted to eliminate our dependence on knowing the layout of the
variables, as this can get complicated with things like partially overlapping arrays, which can happen with ARB_enhanced_layouts or with clip/cull distance arrays. This means no longer changing the layout based on whether the i/o is part of an array or not, and no longer matching producer <-> consumer based on the variables. At the end of the day we have to match things based on the user-specified location, so for simplicity this switches the entire i/o handling to be based off the user location rather than the driver location. This means that the primitive map may be a little bigger, but it reduces the complexity because we never have to build a table mapping user location to driver location, and it reduces the amount of work done at link time in the SSO case. It also brings us closer to what the other drivers do.

While here, I also fixed the handling of component qualifiers, which was another thing broken with clip/cull distances.

Part-of:

9e063b01b77 ir3: Switch tess lowering to use location
src/freedreno/ir3/ir3_nir.c | 10 +-
src/freedreno/ir3/ir3_nir.h | 8 +-
src/freedreno/ir3/ir3_nir_lower_tess.c | 315 +++++++++++++++-----------
src/freedreno/ir3/ir3_shader.h | 8 +-
src/freedreno/vulkan/tu_pipeline.c | 8 +-
src/gallium/drivers/freedreno/ir3/ir3_const.h | 8 +-
6 files changed, 199 insertions(+), 158 deletions(-)

Upstream: cgit.freedesktop.org


  • Share