nir/opt_load_store_vectorize: don't vectorize stores across demote

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: ce9205c03b ("nir: add a load/store vectorization pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7163>
This commit is contained in:
Rhys Perry 2020-10-15 14:13:36 +01:00 committed by Marge Bot
parent 19aaafd4a6
commit f8e971f511
2 changed files with 7 additions and 0 deletions

View file

@ -1172,6 +1172,11 @@ handle_barrier(struct vectorize_ctx *ctx, bool *progress, nir_function_impl *imp
case nir_intrinsic_discard:
modes = nir_var_all;
break;
case nir_intrinsic_demote_if:
case nir_intrinsic_demote:
acquire = false;
modes = nir_var_all;
break;
case nir_intrinsic_memory_barrier_buffer:
modes = nir_var_mem_ssbo | nir_var_mem_global;
break;

View file

@ -355,6 +355,8 @@ nir_schedule_intrinsic_deps(nir_deps_state *state,
case nir_intrinsic_discard:
case nir_intrinsic_discard_if:
case nir_intrinsic_demote:
case nir_intrinsic_demote_if:
/* We are adding two dependencies:
*
* * A individual one that we could use to add a read_dep while handling