radeonsi: add a gfx10 bug workaround for NOT_EOP

Fixes: cc24ec8c07 - radeonsi: set NOT_EOP for back-to-back draws on gfx10+

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>
This commit is contained in:
Marek Olšák 2021-05-07 22:52:42 -04:00 committed by Marge Bot
parent 7effb291e6
commit d8fefb1322

View file

@ -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;