mesa/src/compiler
Timothy Arceri f1acf492de glsl: fix slow linking of uniforms in the nir linker
Currently the nir linker resizes the amount of storage needed to hold
uniform information on the fly while linking. As shaders can contain
thousands of uniforms this can be very slow. For example some Godot
shaders can take 30 seconds to compile on some machines.

In this change we count the amount of storage needed before we start
processing the uniforms. This is what the GLSL IR linker does also.

Fixes: 95f555a93a ("st/glsl_to_nir: make use of nir linker for linking uniforms")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2996

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5137>
2020-05-27 00:59:20 +00:00
..
glsl glsl: fix slow linking of uniforms in the nir linker 2020-05-27 00:59:20 +00:00
nir nir: Fix sources for image atomic fadd 2020-05-26 23:24:45 +00:00
spirv spirv: add support for bias/lod with OpImageGather 2020-05-25 08:51:10 +02:00
Android.glsl.gen.mk mesa: android: Remove unnecessary dependency tracking rules 2019-05-06 11:29:25 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk nir: Add missing dependency in Android.nir.gen.mk 2019-08-19 09:53:18 +03:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
builtin_type_macros.h glsl_types: vec8/vec16 support 2018-03-25 10:42:54 -04:00
glsl_types.cpp glsl_type: don't serialize padding bytes from glsl_struct_field 2020-05-20 14:15:00 +00:00
glsl_types.h glsl_type: don't serialize padding bytes from glsl_struct_field 2020-05-20 14:15:00 +00:00
Makefile.sources nir: add pass to lower disjoint wrmask's 2020-05-13 20:24:49 -07:00
meson.build meson: inline inc_common 2020-03-28 21:36:54 +01:00
nir_types.cpp nir/lower_amul: fix slot calculation 2020-04-06 18:00:17 +00:00
nir_types.h nir/lower_amul: fix slot calculation 2020-04-06 18:00:17 +00:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl Move compiler.h and imports.h/c from src/mesa/main into src/util 2020-03-27 21:00:09 +00:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c compiler: add VARYING_SLOT_VIEWPORT_MASK 2020-04-15 20:12:00 -04:00
shader_enums.h freedreno/ir3: Improve shader key normalization. 2020-05-01 16:26:32 +00:00
shader_info.h spirv: add SpvCapabilityImageGatherBiasLodAMD 2020-05-25 08:51:10 +02:00