llvmpipe: bin state-change commands
authorBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 18:50:40 +0000 (11:50 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 18:50:43 +0000 (11:50 -0700)
commitb1659b9213f3eeee440590dfe379f0d193948307
tree7aa9c3419c3debad517a3d9b33ff21989f9396b2
parent9dca0100489c7a7c02af77da42a39dbe1560d7e2
llvmpipe: bin state-change commands

Previously, each triangle had a pointer to the state to use for shading.
Now we insert state-change commands into the bins.  When we execute one
of those commands we just update a 'current state' pointer and use that
pointer when calling the jit shader.

When inserting state-change commands into a bin we check if the previous
command was also a state-change command and simply replace it.  This
avoids accumulating useless/redundant state-change commands.
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_rast.h
src/gallium/drivers/llvmpipe/lp_rast_priv.h
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_setup_context.h
src/gallium/drivers/llvmpipe/lp_setup_tri.c