nir: Add pass to split 64 bit vec3 and vec4 variable access and phis

NTT can't convert local 64 variables of type vec3 or vec4, therefore,
they need to be split into vec2 + double or vec2 + vec2.

At the same time deal splitting the phi nodes.

The pass goes into the global namespace because it is also useful
for r600.

v2: only lower function_temps (Emma) and handle array of arrays (Jason)

v3: - remove bool parameter in function to merge
      vec3 and vec4
    - simplify load/store_deref_(array|var)
    - use a pointer hash table
    - simplify PHI splitting (all Emma)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15945>
This commit is contained in:
Gert Wollny
2022-04-13 17:57:06 +02:00
committed by Marge Bot
parent d48c10fab3
commit 496fd59d71
3 changed files with 334 additions and 0 deletions

View File

@@ -271,6 +271,7 @@ files_libnir = files(
'nir_search_helpers.h',
'nir_serialize.c',
'nir_serialize.h',
'nir_split_64bit_vec3_and_vec4.c',
'nir_split_per_member_structs.c',
'nir_split_var_copies.c',
'nir_split_vars.c',