nir: Add new linking helper to set linked driver locations.
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 30 Mar 2020 13:58:07 +0000 (15:58 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 11:51:04 +0000 (11:51 +0000)
commit7aa61c84fe47f139b96b29d39b3298f30b96c89c
treef91dfcdebaede2989abab0592660302d54536716
parent7056714f5039e8f4302075677d962b5dd925e107
nir: Add new linking helper to set linked driver locations.

This commit introduces a new function nir_assign_linked_io_var_locations
which is intended to help with assigning driver locations to shaders
during linking, primarily aimed at the VS->TCS->TES->GS stages.

It ensures that the linked shaders have the same driver locations,
and it also packs these as close to each other as possible.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4388>
src/compiler/nir/nir.h
src/compiler/nir/nir_linking_helpers.c