nir: Filter modes of scoped memory barrier in nir_opt_load_store_vectorize
Otherwise a scoped memory barrier containing nir_var_mem_ubo (which memoryBarrier() does lower to) would incorrectly prevent the optimization to happen in UBOs. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980>
This commit is contained in:
parent
5c5555a862
commit
1a42e7dae9
|
@ -1229,7 +1229,9 @@ handle_barrier(struct vectorize_ctx *ctx, bool *progress, nir_function_impl *imp
|
|||
if (nir_intrinsic_memory_scope(intrin) == NIR_SCOPE_NONE)
|
||||
break;
|
||||
|
||||
modes = nir_intrinsic_memory_modes(intrin);
|
||||
modes = nir_intrinsic_memory_modes(intrin) & (nir_var_mem_ssbo |
|
||||
nir_var_mem_shared |
|
||||
nir_var_mem_global);
|
||||
acquire = nir_intrinsic_memory_semantics(intrin) & NIR_MEMORY_ACQUIRE;
|
||||
release = nir_intrinsic_memory_semantics(intrin) & NIR_MEMORY_RELEASE;
|
||||
switch (nir_intrinsic_memory_scope(intrin)) {
|
||||
|
|
Loading…
Reference in New Issue