[Mesa-dev] i965 brw_eu_emit and SF code generator cleanups

Kenneth Graunke kenneth at whitecape.org
Sun May 25 01:08:46 PDT 2014


Hello,

Matt and I have some ideas for how we could share more code between the
Gen4-7 and Gen8+ compiler backends---hopefully removing the duplicate
generators.  Before we get there, though, I'd like to change the Gen4-7
brw_eu_emit layer to work more like the new Gen8 one.

It has a lot of historical craziness---some functions randomly turn on
predication, sometimes for one instruction, sometimes for all time...
ome other functions turn it back off...sometimes you have to do it
yourself.  It's a mess.

struct brw_compile also contains a field called "flag_value", which
has always seemed rather mystical.  It turns out that it's trying to
track the value of the flag register...for the specific usage of the
SF program.  For general shaders, we obviously can't track that.

This patch series moves flag_value to brw_sf_compile, and eliminates
a bit of the implicit state whacking.  There's more to do, but I've
already hit 10 patches, so...sending them out.

I tested it on Crestline, and also diffed assembly for every Piglit
test before and after the change.  There were no changes.  So I'm
pretty confident this is correct.

--Ken



More information about the mesa-dev mailing list