int last_rast_prim;
unsigned last_sc_line_stipple;
int current_rast_prim; /* primitive type after TES, GS */
+ unsigned last_gsvs_itemsize;
/* Scratch buffer */
boolean emit_scratch_reloc;
sel->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
sel->gs_num_invocations =
sel->info.properties[TGSI_PROPERTY_GS_INVOCATIONS];
+ sel->gsvs_itemsize = sel->info.num_outputs * 16 *
+ sel->gs_max_out_vertices;
for (i = 0; i < sel->info.num_inputs; i++) {
unsigned name = sel->info.input_semantic_name[i];
static void si_update_gs_rings(struct si_context *sctx)
{
- unsigned gs_vert_itemsize = sctx->gs_shader->info.num_outputs * 16;
- unsigned gs_max_vert_out = sctx->gs_shader->gs_max_out_vertices;
- unsigned gsvs_itemsize = gs_vert_itemsize * gs_max_vert_out;
+ unsigned gsvs_itemsize = sctx->gs_shader->gsvs_itemsize;
uint64_t offset;
+ if (gsvs_itemsize == sctx->last_gsvs_itemsize)
+ return;
+
+ sctx->last_gsvs_itemsize = gsvs_itemsize;
+
si_set_ring_buffer(&sctx->b.b, PIPE_SHADER_GEOMETRY, SI_RING_GSVS,
sctx->gsvs_ring, gsvs_itemsize,
64, true, true, 4, 16, 0);