anv: Remove anv_image::surface_type
authorChad Versace <chad.versace@intel.com>
Thu, 10 Dec 2015 00:59:02 +0000 (16:59 -0800)
committerChad Versace <chad.versace@intel.com>
Mon, 14 Dec 2015 18:46:27 +0000 (10:46 -0800)
commitee57062e1ec5d1d4666239c5a9c426982861f375
tree414c27925118fb115dd524e2b8c03644ee88730e
parentf0d11d5a814b792eb5f5161e9332123aaaf689fb
anv: Remove anv_image::surface_type

When building RENDER_SURFACE_STATE, the driver set
SurfaceType = anv_image::surface_type, which was calculated during
anv_image_init(). This was bad because the value of
anv_image::surface_type was taken from a gen-specific header,
gen8_pack.h, even though the anv_image structure is used for all gens.

Replace anv_image::surface_type with a gen-specific lookup function,
anv_surftype(), defined in gen${x}_state.c.

The lookup function contains some useful asserts that caught some nasty
bugs in anv meta, which were fixed in the previous commit.
src/vulkan/anv_image.c
src/vulkan/anv_private.h
src/vulkan/gen7_state.c
src/vulkan/gen8_state.c