From 9b605df33a7c04931341fd517d3b90412d07101a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 11 Sep 2023 12:31:20 +0200 Subject: [PATCH 45/64] panfrost: clean up index_size logic --- src/gallium/drivers/panfrost/pan_cmdstream.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index c26145c5820..dbf3c1c0a82 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -4085,13 +4085,13 @@ panfrost_direct_draw(struct panfrost_batch *batch, /* Base vertex offset on Valhall is used for both indexed and * non-indexed draws, in a simple way for either. Handle both cases. */ - ceu_move32_to(b, ceu_reg32(b, 36), - info->index_size ? draw->index_bias : draw->start); - - if (info->index_size) + if (info->index_size) { + ceu_move32_to(b, ceu_reg32(b, 36), draw->index_bias); ceu_move32_to(b, ceu_reg32(b, 39), info->index_size * draw->count); - else + } else { + ceu_move32_to(b, ceu_reg32(b, 36), draw->start); ceu_move32_to(b, ceu_reg32(b, 39), 0); + } ceu_move64_to(b, ceu_reg64(b, 40), panfrost_batch_get_bifrost_tiler(batch, ~0)); -- 2.42.0