aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_vsc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c
index daf97fe48ac..43b8c2753a9 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_vsc.c
@@ -114,12 +114,11 @@ draw_stream_size_bits(const struct pipe_draw_info *info, unsigned num_bins,
unsigned prim_strm_bits)
{
unsigned ndwords = prim_strm_bits / dword;
- assert(info->instance_count > 0);
return (bitfield_size_bits(num_bins) /* bitfield of bins */
+ 1 /* last-instance-bit */
+ number_size_bits(ndwords) /* size of corresponding prim strm */
+ 1 /* checksum */
- ) * info->instance_count;
+ ) * MAX2(1, info->instance_count);
}
void