i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Dec 2012 20:45:14 +0000 (12:45 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 3 Jan 2013 21:36:04 +0000 (13:36 -0800)
commit82f8e8ebd57720f1e9d148c7dc65b14c218307df
tree5b27bf47cbab91f7ce66779b2f11f59e388a0a7d
parent5bf357db89836d0f4e4b8a4cb559755d4734b81b
i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.

Every generation except Gen7 creates SURFACE_STATE entries via a
uint32_t array.  Only Gen7 uses the older bitfield structure, which we
moved away from because it was less efficient.  Convert it for
consistency.

This reduces the compiled size of gen7_wm_surface_state.o by 2.86% in a
release build.

v2: Fix accidental use of BRW_SURFACE_WIDTH/HEIGHT in brw_state_dump.c;
    switch back to gen7_set_surface_mcs_info setting surf[6] directly
    (both per Eric's review comments).

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_state_dump.c
src/mesa/drivers/dri/i965/brw_structs.h
src/mesa/drivers/dri/i965/gen7_blorp.cpp
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c