aco: implement 8-bit/16-bit nir_intrinsic_read_first_invocation
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 8 Apr 2020 07:17:38 +0000 (09:17 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 15:06:48 +0000 (15:06 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4494>

src/amd/compiler/aco_instruction_selection.cpp

index a5eee1123710711577ddc95a3d2f88c6eeaba652..47376511ed52555d734ad09bec801b90ff2768ca 100644 (file)
@@ -7584,7 +7584,7 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
    case nir_intrinsic_read_first_invocation: {
       Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
       Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
-      if (src.regClass() == v1) {
+      if (src.regClass() == v1b || src.regClass() == v2b || src.regClass() == v1) {
          emit_wqm(ctx,
                   bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), src),
                   dst);