nir: fix gathering cross invocation info
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 23 Nov 2020 09:39:52 +0000 (10:39 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 23 Nov 2020 11:00:17 +0000 (11:00 +0000)
Fixes: 5b77b14448c ("nir: Use src_is_invocation_id in get_deref_info.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7730>

src/compiler/nir/nir_gather_info.c

index bf0f1e3..097aaa8 100644 (file)
@@ -53,7 +53,7 @@ get_deref_info(nir_shader *shader, nir_variable *var, nir_deref_instr *deref,
    /* Vertex index is the outermost array index. */
    if (per_vertex) {
       assert((*p)->deref_type == nir_deref_type_array);
-      *cross_invocation = src_is_invocation_id(&(*p)->arr.index);
+      *cross_invocation = !src_is_invocation_id(&(*p)->arr.index);
       p++;
    }