freedreno/a6xx: pre-calculate expected vsc stream sizes
authorRob Clark <robdclark@chromium.org>
Sat, 25 Apr 2020 19:16:35 +0000 (12:16 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Apr 2020 23:31:58 +0000 (23:31 +0000)
commitf561e516c8a01993ea83f5d48e0126d0b7b6528b
tree4a1c3a46089dc9300b2fb6fd2c2fe507fd7adc1b
parent99d802ccc77c7897f27d75275d38c702f3db6fd8
freedreno/a6xx: pre-calculate expected vsc stream sizes

We should only rely on overflow detection for indirect draws, where we
have no other option.

This doesn't use quite the worst-possible-case sizes, which in practice
seem to be ~20x larger than what is required.  But instead uses roughly
half of that.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4750>
src/gallium/drivers/freedreno/Makefile.sources
src/gallium/drivers/freedreno/a6xx/fd6_draw.c
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c
src/gallium/drivers/freedreno/a6xx/fd6_vsc.c [new file with mode: 0644]
src/gallium/drivers/freedreno/a6xx/fd6_vsc.h [new file with mode: 0644]
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/meson.build