mesa/src/compiler
Timothy Arceri 59b2549279 glsl/nir: fix function cloning at link time
As per the code comment added in this commit the nir produced from
glsl to nir doesn't always keep function declarations before the
code that calls them e.g. calls from within other function
implementations. The change in this commit works around this problem by
first cloning all function declarations in a first pass, then cloning
the implementations in a second pass once we have filled the remap
table.

Fixes: cbfc225e2b ("glsl: switch to a full nir based linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12115

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32100>
2024-11-13 22:47:50 +00:00
..
clc clc: add mesa_clc tool 2024-11-01 13:25:37 -07:00
glsl glsl/nir: fix function cloning at link time 2024-11-13 22:47:50 +00:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
nir aco,ac/nir: flag loads to use smem in NIR 2024-11-13 12:59:26 +00:00
rust compiler/rust: Copy NirInstrPrinter from NAK 2024-10-18 12:43:52 +00:00
spirv spirv: handle NonSemantic.DebugBreak to emit nir_debug_break() 2024-11-12 16:05:17 +00:00
builtin_types.py compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
glsl_types.h nir/lower_vars_to_scratch: calculate threshold-limited variable size separately 2024-08-07 14:32:28 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add SYSTEM_VALUE_PIXEL_COORD 2024-11-04 12:34:30 +00:00
shader_enums.h aco,ac/nir: flag loads to use smem in NIR 2024-11-13 12:59:26 +00:00
shader_info.h nir: add shader_info::tess::tcs_same_invocation_inputs_read(_indirect) 2024-10-21 18:53:51 +00:00