zink: handle nir_intrinsic_load_helper_invocation
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 20 Aug 2020 20:16:04 +0000 (16:16 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Feb 2021 00:04:19 +0000 (00:04 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8949>

src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index 78dd437..592af34 100644 (file)
@@ -85,7 +85,7 @@ struct ntv_context {
          push_const_var,
          workgroup_id_var, num_workgroups_var,
          local_invocation_id_var, global_invocation_id_var,
-         local_invocation_index_var,
+         local_invocation_index_var, helper_invocation_var,
          shared_block_var;
 };
 
@@ -2653,6 +2653,10 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr)
       spirv_builder_end_primitive(&ctx->builder, nir_intrinsic_stream_id(intr));
       break;
 
+   case nir_intrinsic_load_helper_invocation:
+      emit_load_vec_input(ctx, intr, &ctx->helper_invocation_var, "gl_HelperInvocation", SpvBuiltInHelperInvocation, nir_type_bool);
+      break;
+
    case nir_intrinsic_load_patch_vertices_in:
       emit_load_vec_input(ctx, intr, &ctx->tess_patch_vertices_in, "gl_PatchVerticesIn",
                           SpvBuiltInPatchVertices, nir_type_int);