For non-views, as part of texture validation, copy the first teximage's mt->format to the intel_texobj->format. Bail out of texture validation for views before this point.
For views, as part of view creation, apply the same transforms (separate stencil & ETC2 are the big ones) as the normal path, and store the mesa_format in intel_texobj->format.
For renderbuffers (wrappers), copy the format from the intel_texobj rather than the mt.
Be careful in blorp, blit copies [if we try to support pre-Gen6 views], tex upload fast path copies, ...
Meta shouldn't need anything special -- it only cares about the GL side.
We stash mesa_format in a bunch of places:
We require, before rendering:
Proposal:
Meta shouldn't need anything special -- it only cares about the GL side.