radeonsi: don't use lp_build_alloca
[mesa.git] / src / gallium / drivers / radeonsi / gfx10_shader_ngg.c
index c4bdff35deb58e45c4d7b3ec10e50cce485fe74a..4f814f7a05be14eb9d7b75c7f9cc09c6734f1ed3 100644 (file)
@@ -1137,7 +1137,7 @@ void gfx10_ngg_gs_emit_epilogue(struct si_shader_context *ctx)
        /* TODO: culling */
 
        /* Determine vertex liveness. */
-       LLVMValueRef vertliveptr = lp_build_alloca(&ctx->gallivm, ctx->ac.i1, "vertexlive");
+       LLVMValueRef vertliveptr = ac_build_alloca(&ctx->ac, ctx->ac.i1, "vertexlive");
 
        tmp = LLVMBuildICmp(builder, LLVMIntULT, tid, num_emit_threads, "");
        ac_build_ifcc(&ctx->ac, tmp, 5120);
@@ -1315,10 +1315,7 @@ void gfx10_ngg_calculate_subgroup_info(struct si_shader *shader)
                shader->previous_stage_sel ? shader->previous_stage_sel : gs_sel;
        const enum pipe_shader_type gs_type = gs_sel->type;
        const unsigned gs_num_invocations = MAX2(gs_sel->gs_num_invocations, 1);
-       /* TODO: Use QUADS as the worst case because of reuse, but triangles
-        * will always have 1 additional unoccupied vector lane. We could use
-        * that lane if the worst case was TRIANGLES. */
-       const unsigned input_prim = si_get_input_prim(gs_sel, PIPE_PRIM_QUADS);
+       const unsigned input_prim = si_get_input_prim(gs_sel);
        const bool use_adjacency = input_prim >= PIPE_PRIM_LINES_ADJACENCY &&
                                   input_prim <= PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY;
        const unsigned max_verts_per_prim = u_vertices_per_prim(input_prim);