diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 1b47cf986ba..682195ba528 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -1270,6 +1270,16 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw sctx->last_base_vertex = draws[num_draws - 1].index_bias; } else { /* DrawID and BaseVertex are constant. */ + if (GFX_VERSION == GFX10) { + /* GFX10 has a bug that consecutive draw packets with NOT_EOP must not have + * count == 0 in the last draw (which doesn't set NOT_EOP). + * + * So remove all trailing draws with count == 0. + */ + while (num_draws > 1 && !draws[num_draws - 1].count) + num_draws--; + } + for (unsigned i = 0; i < num_draws; i++) { uint64_t va = index_va + draws[i].start * index_size;