diff options
author | Connor Abbott <[email protected]> | 2019-03-04 17:51:12 +0100 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-03-12 10:49:48 +0100 |
commit | 5b2ec9c81e1abafd19f1efbbe499df03ae4aa37e (patch) | |
tree | ca352f1cdcb042bc2e4ec7c265b7d28964f583aa /src/compiler/nir/meson.build | |
parent | 6403171843824ec8e9484bb8a21a4a18bfb01193 (diff) |
nir: Add a stripping pass for improved cacheability
Oftentimes various nir shaders after lowering will be the same, or
almost the same. For example, this can happen when the same shader is
linked with different shaders to form different pipelines and
cross-stage optimizations don't kick in to change it. We want to avoid
running the backend twice on these shaders. We were already doing this
with radeonsi, but we were storing a few extra pieces of information
that made this much less effective compared to TGSI. The worse offender
by far was the program name, which caused most of the cache misses. This
pass strips out these pieces of information, controlled by the NIR_STRIP
debug env variable.
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/meson.build')
-rw-r--r-- | src/compiler/nir/meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index af781f9a2d5..93b15c7ce1f 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -189,6 +189,7 @@ files_libnir = files( 'nir_search_helpers.h', 'nir_serialize.c', 'nir_serialize.h', + 'nir_strip.c', 'nir_split_per_member_structs.c', 'nir_split_var_copies.c', 'nir_split_vars.c', |