Here is a rebase of refactoring originally sent in early May. This is now based on Curro's work and applies on top of the current master. I chose to re-order my patches in order to keep them as tiny as possible. Especially the dispatch for the texture buffer surfaces is split in two parts - one patch introducing it in the common dispatcher and second dropping the redundant calls left in gen7 and gen8 specific logic while moving to use Curro's emit_texture_surface_state() instead of update_texture_surface().
End result is a common dispatcher making the decisions for values in common code while leaving the hardware specific parts to deal with batch formatting only. The series also moves gen < 7 logic to use the same hooks as the newer allowing us to drop the other hook (update_texture_surface()) alltogether. This is mostly motivated by my work on using blorp-style lightweight launch mechanism for meta blits and clears. CC: Matt Turner <matts...@gmail.com> CC: Kenneth Graunke <kenn...@whitecape.org> CC: Francisco Jerez <curroje...@riseup.net> Topi Pohjolainen (10): i965: Use constant miptree pointer in tex surface setup i965: Reduce the scope of input in buffer tex setup i965: Move tex buffer dispatch into hw independent setup i965/gen4: Use tex object format instead of the miptree format i965: Move tex miptree and format resolving into dispatcher i965/gen7: Move tex gather format override into common dispatcher i965: Move texture swizzle resolving into dispatcher i965: Refactor effective depth calculation i965: Use emit_texture_surface_state() directly i965: Remove update_texture_surface() src/mesa/drivers/dri/i965/brw_context.h | 10 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 107 +++++++++++++++------- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 51 +---------- src/mesa/drivers/dri/i965/gen8_surface_state.c | 52 +---------- 4 files changed, 77 insertions(+), 143 deletions(-) -- 1.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev