mirror of https://gitlab.freedesktop.org/mesa/mesa
47e7c6961a
This effectively does the opposite of nir_lower_alus_to_scalar, trying to combine per-component ALU operations with the same sources but different swizzles into one larger ALU operation. It uses a similar model as CSE, where we do a depth-first approach and keep around a hash set of instructions to be combined, but there are a few major differences: 1. For now, we only support entirely per-component ALU operations. 2. Since it's not always guaranteed that we'll be able to combine equivalent instructions, we keep a stack of equivalent instructions around, trying to combine new instructions with instructions on the stack. The pass isn't comprehensive by far; it can't handle operations where some of the sources are per-component and others aren't, and it can't handle phi nodes. But it should handle the more common cases, and it should be reasonably efficient. [Alyssa: Rebase on latest master, updating with respect to typeless moves] Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> |
||
---|---|---|
.. | ||
glsl | ||
nir | ||
spirv | ||
Android.glsl.gen.mk | ||
Android.glsl.mk | ||
Android.mk | ||
Android.nir.gen.mk | ||
Android.nir.mk | ||
Makefile.sources | ||
SConscript | ||
SConscript.glsl | ||
SConscript.nir | ||
SConscript.spirv | ||
blob.c | ||
blob.h | ||
builtin_type_macros.h | ||
glsl_types.cpp | ||
glsl_types.h | ||
meson.build | ||
nir_types.cpp | ||
nir_types.h | ||
shader_enums.c | ||
shader_enums.h | ||
shader_info.h |