aco: Implement load_patch_vertices_in.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 25 Feb 2020 12:20:36 +0000 (13:20 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 08:34:10 +0000 (08:34 +0000)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964>

src/amd/compiler/aco_instruction_selection.cpp

index c8b10cf150fb3bf8989bca6ebafd38e6f7515553..0b5a62b0ea4e46a8007567a6ffa788e940fff60b 100644 (file)
@@ -6875,6 +6875,14 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
 
       break;
    }
+   case nir_intrinsic_load_patch_vertices_in: {
+      assert(ctx->shader->info.stage == MESA_SHADER_TESS_CTRL ||
+             ctx->shader->info.stage == MESA_SHADER_TESS_EVAL);
+
+      Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
+      bld.copy(Definition(dst), Operand(ctx->args->options->key.tcs.input_vertices));
+      break;
+   }
    case nir_intrinsic_emit_vertex_with_counter: {
       visit_emit_vertex_with_counter(ctx, instr);
       break;