chrisforbes/mesa

View format overrides -- store the mesa_format in the intel_texobj.

Closed this issue · 1 comments

We stash mesa_format in a bunch of places:

  • In each teximage
  • In the mt attached to each teximage
  • In the mt attached to the texobj

We require, before rendering:

  • All of the teximages point at the same mt
  • The texobj points at the same mt as its teximages

Proposal:

  • 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.

Done and works!