nir: add get_induction_and_limit_vars() helper to loop analysis
[mesa.git] / src / compiler / nir / nir_lower_gs_intrinsics.c
index 68e20dd600f8c86daf6a6b67265818dc5c011f47..78c12e0547503dae490b6aab9b85bae690b01e34 100644 (file)
@@ -77,7 +77,7 @@ rewrite_emit_vertex(nir_intrinsic_instr *intrin, struct state *state)
    nir_ssa_def *count = nir_load_var(b, state->vertex_count_var);
 
    nir_ssa_def *max_vertices =
-      nir_imm_int(b, b->shader->info->gs.vertices_out);
+      nir_imm_int(b, b->shader->info.gs.vertices_out);
 
    /* Create: if (vertex_count < max_vertices) and insert it.
     *
@@ -165,7 +165,6 @@ append_set_vertex_count(nir_block *end_block, struct state *state)
    /* Insert the new intrinsic in all of the predecessors of the end block,
     * but before any jump instructions (return).
     */
-   struct set_entry *entry;
    set_foreach(end_block->predecessors, entry) {
       nir_block *pred = (nir_block *) entry->key;
       b->cursor = nir_after_block_before_jump(pred);