summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2019-03-04 18:00:30 +0100
committerConnor Abbott <[email protected]>2019-03-12 10:49:48 +0100
commit1bbe58c214b4ff7f614bfadb5c8691a2fe47ab51 (patch)
tree97f387234fd95fb8ca7a5bf2c9ba05a39294ac62
parent5b2ec9c81e1abafd19f1efbbe499df03ae4aa37e (diff)
radeonsi/nir: Use nir stripping pass
This reduces compilation time for my shader-db collection from around 40 seconds to 30, vs. 19 seconds for TGSI. There are still some shaders that TGSI caches but NIR doesn't, partly because of more aggressive cross-stage optimizations with NIR. Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 5fc1df250aa..25429fdeab7 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -892,6 +892,11 @@ si_lower_nir(struct si_shader_selector* sel)
} while (progress);
NIR_PASS_V(sel->nir, nir_lower_bool_to_int32);
+
+ /* Strip the resulting shader so that the shader cache is more likely
+ * to hit from other similar shaders.
+ */
+ nir_strip(sel->nir);
}
static void declare_nir_input_vs(struct si_shader_context *ctx,