diff options
author | Iago Toral Quiroga <[email protected]> | 2015-07-15 09:32:17 +0200 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-03 09:40:51 -0700 |
commit | da1b1bf85cdc691ec27f379de84dec495cdd51e0 (patch) | |
tree | 6fbb71a6cbc05f14248549bd90cb371e88ffc896 /src/mesa | |
parent | 34d162260f513a7eaec12611e3859bb34230cf33 (diff) |
i965/nir: Do not scalarize phis in non-scalar setups
Significantly reduces register pressure in some piglit tests.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 49d17422546..b5788fa2e33 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -42,8 +42,12 @@ nir_optimize(nir_shader *nir, bool is_scalar) progress |= nir_copy_prop(nir); nir_validate_shader(nir); - nir_lower_phis_to_scalar(nir); - nir_validate_shader(nir); + + if (is_scalar) { + nir_lower_phis_to_scalar(nir); + nir_validate_shader(nir); + } + progress |= nir_copy_prop(nir); nir_validate_shader(nir); progress |= nir_opt_dce(nir); |