diff --git a/src/compiler/nir/nir_passthrough_gs.c b/src/compiler/nir/nir_passthrough_gs.c index 6c0fea95e50..0386d1e5223 100644 --- a/src/compiler/nir/nir_passthrough_gs.c +++ b/src/compiler/nir/nir_passthrough_gs.c @@ -22,6 +22,7 @@ */ #include "util/u_memory.h" +#include "util/u_prim.h" #include "nir.h" #include "nir_builder.h" #include "nir_xfb_info.h" @@ -134,7 +135,7 @@ nir_create_passthrough_gs(const nir_shader_compiler_options *options, nir_shader *nir = b.shader; nir->info.gs.input_primitive = gs_in_prim_for_topology(primitive_type); nir->info.gs.output_primitive = (force_line_strip_out || emulate_edgeflags) ? MESA_PRIM_LINE_STRIP : original_our_prim; - nir->info.gs.vertices_in = vertices_out; + nir->info.gs.vertices_in = u_vertices_per_prim(primitive_type); nir->info.gs.vertices_out = needs_closing ? vertices_out + 1 : vertices_out; nir->info.gs.invocations = 1; nir->info.gs.active_stream_mask = 1;