OSDN Git Service

i965: Simplify handling of VUE map changes.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 29 Aug 2015 07:33:10 +0000 (00:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Sep 2015 18:59:56 +0000 (11:59 -0700)
commitdf221f65e26199a74bc259d3f94e70637b843afa
treecb623ad296862ed7d556d6164e8a758a9f0a245b
parent6301af22bb80b2c177539074e3b2c68e65c15d41
i965: Simplify handling of VUE map changes.

The old code was disasterously complex - spread across multiple atoms
which may not even run, inspecting the dirty bits to try and decide
whether it was necessary to do checks...storing VS information in
brw_context...extra flagging...

This code tripped me and Carl up very badly when working on the
shader cache code.  It's very fragile and hard to maintain.

Now that geometry shaders only depend on their inputs and don't have
to worry about the VS VUE map, we can dramatically simplify this:
just compute the VUE map coming out of the geometry shader stage
in brw_upload_programs.  If it changes, flag it.  Done.

v2: Also check vue_map.separable.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/brw_vs.c