diff options
author | Jason Ekstrand <[email protected]> | 2019-02-22 22:10:55 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-02-24 20:01:18 -0600 |
commit | 724371c6b990d3a66ecebbe4bd1802c53e89ed46 (patch) | |
tree | c961b17927fc6c76ed26de20b9bfdfb068cb5383 /src/compiler | |
parent | 7a6a5d4bfa58036c1d5fad0596721616419b9327 (diff) |
nir/split_vars: Don't compact vectors unnecessarily
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_split_vars.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_split_vars.c b/src/compiler/nir/nir_split_vars.c index 244ffd6dcf0..96b6042e6d9 100644 --- a/src/compiler/nir/nir_split_vars.c +++ b/src/compiler/nir/nir_split_vars.c @@ -1423,6 +1423,12 @@ shrink_vec_var_access_impl(nir_function_impl *impl, continue; } + /* If we're not dropping any components, there's no need to + * compact vectors. + */ + if (usage->comps_kept == usage->all_comps) + continue; + if (intrin->intrinsic == nir_intrinsic_load_deref) { b.cursor = nir_after_instr(&intrin->instr); |