[Mesa-dev] i965 surface state tidying, part 1

Kenneth Graunke kenneth at whitecape.org
Fri Sep 13 23:10:27 PDT 2013


Here's a bit of tidying I did to the i965 SURFACE_STATE code:
- It unifies the code for constant buffers/UBOs, texture buffers,
  and shader time buffers.
- It also unifies the texture/renderbuffer code on Gen7+.

Both of these delete a /lot/ of complicated cut and pasted code.
No performance regressions observed in OpenArena on Ivybridge.

There are a few more things I'd like to do:
- Port BLORP to use emit_image_surface_state().
- Unify texture/renderbuffers on Gen4-6.
- Make emit_{buffer,image}_surface_state() vtable hooks.
  Then unify the Gen4-6 and Gen7+ variants of
  update_buffer_texture_surface, update_texture_surface,
  create_constant_surface, and update_renderbuffer_surface.

I stopped before doing this because a bunch of these use tile offsets
instead of LOD fields, and I thought that we were moving away from
tile offsets on Gen4-6 and in BLORP.  I can't remember where Chad and
Eric were at with those endeavors.

No regressions on Ivybridge.  Patches 3-4 still need testing.
Haswell also needs testing.

These patches are available on the 'sstidy' branch of ~kwg/mesa.



More information about the mesa-dev mailing list