i965: Perform program state upload outside of atom handling
authorCarl Worth <cworth@cworth.org>
Wed, 11 Feb 2015 21:53:31 +0000 (13:53 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 23 Feb 2015 22:54:15 +0000 (14:54 -0800)
Across the board of the various generations, the intial few atoms in
all of the atom lists are basically the same, (performing uploads for
the various programs). The only difference is that prior to gen6
there's an ff_gs upload in place of the later gs upload.

In this commit, instead of using the atom lists for this program state
upload, we add a new function brw_upload_programs that calls into the
per-stage upload functions which in turn check dirty bits and return
immediately if nothing needs to be done.

This commit is intended to have no functional change. The motivation
is that future code, (such as the shader cache), wants to have a
single function within which to perform various operations before and
after program upload, (with some local variables holding state across
the upload).

It may be worth looking at whether some of the other functionality
currently handled via atoms might also be more cleanly handled in a
similar fashion.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

No differences found