freedreno/a3xx: refactor/optimize emit
authorRob Clark <robclark@freedesktop.org>
Tue, 14 Oct 2014 18:27:47 +0000 (14:27 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 15 Oct 2014 19:49:48 +0000 (15:49 -0400)
commitd595987ea3d1706fecb9f6416031ec8b27c95a9e
treeb82b1dc6c693884db8bdc3c43b2f9939b6a7a472
parentd5d80b37392c7f15c4fb39b6b1826230239930fd
freedreno/a3xx: refactor/optimize emit

Because we reuse various bits of emit code (for state/vertex/prog/etc)
for both regular draws and internal draws (gmem<->mem, clear, etc), the
number of parameters getting passed around has been growing.  Refactor
to group these into fd3_emit.  This simplifies fxn signatures, avoids
passing around shader key on the stack, etc.  It also gives us a nice
place to cache shader-variant lookup to avoid looking up shader variants
multiple times per draw (without having to *also* pass them around as
fxn args everywhere).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_emit.h
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a3xx/fd3_program.c
src/gallium/drivers/freedreno/a3xx/fd3_program.h
src/gallium/drivers/freedreno/ir3/ir3_shader.h