ac/nir: clear nir_var_shader_out from TCS barriers
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 2 Mar 2023 05:47:30 +0000 (00:47 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Mar 2023 07:29:09 +0000 (07:29 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

src/amd/common/ac_nir_lower_tess_io_to_mem.c

index 0dfe8ab..83f8f76 100644 (file)
@@ -485,8 +485,10 @@ update_hs_scoped_barrier(nir_intrinsic_instr *intrin, lower_tess_io_state *st)
     * so we have to update the barriers to also reflect this.
     */
    unsigned mem_modes = nir_intrinsic_memory_modes(intrin);
-   if (mem_modes & nir_var_shader_out)
+   if (mem_modes & nir_var_shader_out) {
       mem_modes |= nir_var_mem_shared;
+      mem_modes &= ~nir_var_shader_out;
+   }
    nir_intrinsic_set_memory_modes(intrin, mem_modes);
 
    nir_scope exec_scope = nir_intrinsic_execution_scope(intrin);