Module: Mesa
Branch: main
Commit: 9fb9e54d69969a0dda83c9b34d2f38156e6ff897
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9fb9e54d69969a0dda83c9b34d2f38156e6ff897

Author: Timur Kristóf <[email protected]>
Date:   Tue Jul  4 14:29:55 2023 +0200

aco: Remove subgroup_id and num_subgroups intrinsics.

These are lowered in NIR now.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24005>

---

 src/amd/compiler/aco_instruction_selection.cpp | 28 --------------------------
 1 file changed, 28 deletions(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index b349f15c2c2..22600ac76d8 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -8233,38 +8233,10 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* 
instr)
       }
       break;
    }
-   case nir_intrinsic_load_subgroup_id: {
-      if (ctx->stage.hw == AC_HW_COMPUTE_SHADER) {
-         const unsigned bfe_const =
-            ctx->program->gfx_level >= GFX10_3 ? (0x14u | 0x5u << 16) : (0x6u 
| (0x6u << 16));
-         bld.sop2(aco_opcode::s_bfe_u32, Definition(get_ssa_temp(ctx, 
&instr->dest.ssa)),
-                  bld.def(s1, scc), get_arg(ctx, ctx->args->tg_size), 
Operand::c32(bfe_const));
-      } else if (ctx->stage.hw == AC_HW_NEXT_GEN_GEOMETRY_SHADER) {
-         /* Get the id of the current wave within the threadgroup (workgroup) 
*/
-         bld.sop2(aco_opcode::s_bfe_u32, Definition(get_ssa_temp(ctx, 
&instr->dest.ssa)),
-                  bld.def(s1, scc), get_arg(ctx, ctx->args->merged_wave_info),
-                  Operand::c32(24u | (4u << 16)));
-      } else {
-         bld.copy(Definition(get_ssa_temp(ctx, &instr->dest.ssa)), 
Operand::zero());
-      }
-      break;
-   }
    case nir_intrinsic_load_subgroup_invocation: {
       emit_mbcnt(ctx, get_ssa_temp(ctx, &instr->dest.ssa));
       break;
    }
-   case nir_intrinsic_load_num_subgroups: {
-      if (ctx->stage.hw == AC_HW_COMPUTE_SHADER)
-         bld.sop2(aco_opcode::s_and_b32, Definition(get_ssa_temp(ctx, 
&instr->dest.ssa)),
-                  bld.def(s1, scc), Operand::c32(0x3fu), get_arg(ctx, 
ctx->args->tg_size));
-      else if (ctx->stage.hw == AC_HW_NEXT_GEN_GEOMETRY_SHADER)
-         bld.sop2(aco_opcode::s_bfe_u32, Definition(get_ssa_temp(ctx, 
&instr->dest.ssa)),
-                  bld.def(s1, scc), get_arg(ctx, ctx->args->merged_wave_info),
-                  Operand::c32(28u | (4u << 16)));
-      else
-         bld.copy(Definition(get_ssa_temp(ctx, &instr->dest.ssa)), 
Operand::c32(0x1u));
-      break;
-   }
    case nir_intrinsic_ballot: {
       Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
       Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);

Reply via email to