[Mesa-dev] [PULL] i965: Merging intel_context and brw_context

Kenneth Graunke kenneth at whitecape.org
Sun Jul 7 17:37:21 PDT 2013


Hello,

This series merges the intel_context data structure into brw_context.
There's definitely more tidying to do: context initialization is still
arbitrarily split into brw/intel halves.  I figured I'd send out the
first 37 patches before continuing, though.

I'd appreciate an "Acked-by" from the i965 developers.  I don't think that
exhaustive review is worth your time.

No Piglit regressions on Ivybridge.  Needs testing on other platforms.

The following changes since commit 1415a1884c59aff37d0f1a53447ef389dd9f9b39:

  i965: fix alpha test for MRT (2013-07-06 12:41:54 +1200)

are available in the git repository at:

  git://people.freedesktop.org/~kwg/mesa tidying-merge-contexts

for you to fetch changes up to 2d76b5865dfb05f9d03aef09c13c387d4c42e6f5:

  i965: Delete intel_context entirely. (2013-07-07 17:12:48 -0700)

----------------------------------------------------------------
Kenneth Graunke (37):
      i965: Replace intel_context:needs_ff_sync with intel->gen == 5.
      i965: Remove i915 chip names.
      i915: Remove i965+ chip names.

These are preliminary unrelated cleanups - in one version of my patch series,
I started editing this code.  I ended up scrapping that, but these stand on
their own.

      i965: Split code to set ctx->Const values into a helper function.
      i965: Move ctx->Const setup from intelInitContext to the new helper.

I tried tidying up the context initialization code, but decided to punt
on further work until merging the data structures.

      i965: Replace #include "intel_context.h" with brw_context.h.
      i965: Add forward declarations of brw_context to a few places.
      i965: Remove pointless intel_context parameter from try_copy_propagate.
      i965: Pass brw_context to functions rather than intel_context.

This is the key step: it makes brw_context available basically everywhere
intel_context is available.  With that in place, we can begin to do
s/intel/brw/g, one bit at a time.

      i965: Move intel_context::optionCache to brw_context.
      i965: Move intel_context::vtbl to brw_context.
      i965: Move front buffer rendering fields from intel_context to brw.
      i965: Move intel_context::reduced_primitive to brw_context.
      i965: Move intel_context's driconf flags to brw_context.
      i965: Move intel_context::bufmgr to brw_context.
      i965: Move intel_context::hw_ctx to brw_context.
      i965: Move intel_context::batch to brw_context.
      i965: Move intel_context::stats_wm to brw_context.
      i965: Move intel_context's framerate throttling fields to brw_context.
      i965: Move intel_context::no_batch_wrap to brw_context.
      i965: Move intel_context::perf_debug to brw_context.
      i965: Move intel_context::max_gtt_map_object_size to brw_context.
      i965: Move intel_context::upload to brw_context.
      i965: Move intel_context::NewGLState to brw_context.
      i965: Move intel_context::driContext to brw_context.
      i965: Store brw_context as the DRI driver private, not intel_context.
      i965: Delete unused intel_context::driFd field.
      i965: Move intel_context::intelScreen to brw_context.
      i965: Move intel_context::has_swizzling to brw_context.
      i965: Shorten context base class dereference chains.
      i965: Free brw, not intel.
      i965: Move intel_context::has_hiz to brw_context.
      i965: Move must_use/has_separate_stencil fields to brw_context.
      i965: Move intel_context::is_<platform> flags to brw_context.
      i965: Move intel_context::has_llc to brw_context.
      i965: Move intel_context::gen and gt fields to brw_context.
      i965: Delete intel_context entirely.

 src/mesa/drivers/dri/i915/intel_context.c          |   1 -
 src/mesa/drivers/dri/i965/brw_blorp.cpp            |  22 +-
 src/mesa/drivers/dri/i965/brw_blorp.h              |   8 +-
 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp       |  56 ++--
 src/mesa/drivers/dri/i965/brw_blorp_clear.cpp      |  26 +-
 src/mesa/drivers/dri/i965/brw_cc.c                 |  16 +-
 src/mesa/drivers/dri/i965/brw_clear.c              |  30 +-
 src/mesa/drivers/dri/i965/brw_clip.c               |  10 +-
 src/mesa/drivers/dri/i965/brw_clip_line.c          |   4 +-
 src/mesa/drivers/dri/i965/brw_clip_state.c         |  16 +-
 src/mesa/drivers/dri/i965/brw_clip_tri.c           |   4 +-
 src/mesa/drivers/dri/i965/brw_clip_util.c          |  11 +-
 src/mesa/drivers/dri/i965/brw_context.c            | 297 ++++++++++---------
 src/mesa/drivers/dri/i965/brw_context.h            | 155 +++++++++-
 src/mesa/drivers/dri/i965/brw_curbe.c              |   9 +-
 src/mesa/drivers/dri/i965/brw_draw.c               |  73 +++--
 src/mesa/drivers/dri/i965/brw_draw_upload.c        |  70 +++--
 src/mesa/drivers/dri/i965/brw_eu.c                 |  11 +-
 src/mesa/drivers/dri/i965/brw_eu.h                 |   6 +-
 src/mesa/drivers/dri/i965/brw_eu_compact.c         |  40 ++-
 src/mesa/drivers/dri/i965/brw_eu_emit.c            | 212 +++++++-------
 src/mesa/drivers/dri/i965/brw_fs.cpp               |  72 +++--
 src/mesa/drivers/dri/i965/brw_fs.h                 |   1 -
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp          |  49 ++--
 src/mesa/drivers/dri/i965/brw_fs_fp.cpp            |   4 +-
 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp  |  11 +-
 .../drivers/dri/i965/brw_fs_vector_splitting.cpp   |   2 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |  45 ++-
 src/mesa/drivers/dri/i965/brw_gs.c                 |  12 +-
 src/mesa/drivers/dri/i965/brw_gs_emit.c            |  15 +-
 src/mesa/drivers/dri/i965/brw_gs_state.c           |   3 +-
 .../dri/i965/brw_lower_texture_gradients.cpp       |   4 +-
 src/mesa/drivers/dri/i965/brw_misc_state.c         | 143 ++++-----
 src/mesa/drivers/dri/i965/brw_primitive_restart.c  |   9 +-
 src/mesa/drivers/dri/i965/brw_program.c            |  18 +-
 src/mesa/drivers/dri/i965/brw_program.h            |   2 +-
 src/mesa/drivers/dri/i965/brw_queryobj.c           |  74 +++--
 .../drivers/dri/i965/brw_schedule_instructions.cpp |   8 +-
 src/mesa/drivers/dri/i965/brw_sf.c                 |   7 +-
 src/mesa/drivers/dri/i965/brw_sf_emit.c            |   8 +-
 src/mesa/drivers/dri/i965/brw_sf_state.c           |  16 +-
 src/mesa/drivers/dri/i965/brw_shader.cpp           |  13 +-
 src/mesa/drivers/dri/i965/brw_shader.h             |   1 -
 src/mesa/drivers/dri/i965/brw_state.h              |   4 +-
 src/mesa/drivers/dri/i965/brw_state_batch.c        |  14 +-
 src/mesa/drivers/dri/i965/brw_state_cache.c        |  11 +-
 src/mesa/drivers/dri/i965/brw_state_dump.c         |  95 +++---
 src/mesa/drivers/dri/i965/brw_state_upload.c       |  19 +-
 src/mesa/drivers/dri/i965/brw_surface_formats.c    |  22 +-
 src/mesa/drivers/dri/i965/brw_tex.c                |   6 +-
 src/mesa/drivers/dri/i965/brw_tex_layout.c         |  36 +--
 src/mesa/drivers/dri/i965/brw_urb.c                |  11 +-
 src/mesa/drivers/dri/i965/brw_vec4.cpp             |  21 +-
 src/mesa/drivers/dri/i965/brw_vec4.h               |   4 +-
 .../drivers/dri/i965/brw_vec4_copy_propagation.cpp |   5 +-
 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp        |  42 ++-
 .../drivers/dri/i965/brw_vec4_reg_allocate.cpp     |   4 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     |  71 +++--
 src/mesa/drivers/dri/i965/brw_vec4_vp.cpp          |   4 +-
 src/mesa/drivers/dri/i965/brw_vs.c                 |  41 ++-
 src/mesa/drivers/dri/i965/brw_vs_state.c           |   9 +-
 src/mesa/drivers/dri/i965/brw_vs_surface_state.c   |  11 +-
 src/mesa/drivers/dri/i965/brw_vtbl.c               |  36 ++-
 src/mesa/drivers/dri/i965/brw_wm.c                 |  64 ++---
 src/mesa/drivers/dri/i965/brw_wm_sampler_state.c   |  22 +-
 src/mesa/drivers/dri/i965/brw_wm_state.c           |  17 +-
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c   | 101 +++----
 src/mesa/drivers/dri/i965/gen6_blorp.cpp           |  62 +---
 src/mesa/drivers/dri/i965/gen6_blorp.h             |   3 +-
 src/mesa/drivers/dri/i965/gen6_cc.c                |  12 +-
 src/mesa/drivers/dri/i965/gen6_clip_state.c        |   3 +-
 src/mesa/drivers/dri/i965/gen6_depthstencil.c      |   5 +-
 src/mesa/drivers/dri/i965/gen6_gs_state.c          |   2 -
 src/mesa/drivers/dri/i965/gen6_multisample_state.c |  13 +-
 src/mesa/drivers/dri/i965/gen6_queryobj.c          |  64 ++---
 src/mesa/drivers/dri/i965/gen6_sampler_state.c     |   2 -
 src/mesa/drivers/dri/i965/gen6_scissor_state.c     |   3 +-
 src/mesa/drivers/dri/i965/gen6_sf_state.c          |   5 +-
 src/mesa/drivers/dri/i965/gen6_sol.c               |  10 +-
 src/mesa/drivers/dri/i965/gen6_urb.c               |   3 +-
 src/mesa/drivers/dri/i965/gen6_viewport_state.c    |   6 +-
 src/mesa/drivers/dri/i965/gen6_vs_state.c          |  11 +-
 src/mesa/drivers/dri/i965/gen6_wm_state.c          |   6 +-
 src/mesa/drivers/dri/i965/gen7_blorp.cpp           |  57 +---
 src/mesa/drivers/dri/i965/gen7_blorp.h             |   3 +-
 src/mesa/drivers/dri/i965/gen7_clip_state.c        |   3 +-
 src/mesa/drivers/dri/i965/gen7_disable.c           |   2 -
 src/mesa/drivers/dri/i965/gen7_misc_state.c        |   7 +-
 src/mesa/drivers/dri/i965/gen7_sampler_state.c     |   5 +-
 src/mesa/drivers/dri/i965/gen7_sf_state.c          |  10 +-
 src/mesa/drivers/dri/i965/gen7_sol_state.c         |  22 +-
 src/mesa/drivers/dri/i965/gen7_urb.c               |  11 +-
 src/mesa/drivers/dri/i965/gen7_viewport_state.c    |   5 +-
 src/mesa/drivers/dri/i965/gen7_vs_state.c          |   8 +-
 src/mesa/drivers/dri/i965/gen7_wm_state.c          |  12 +-
 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c  |  42 ++-
 src/mesa/drivers/dri/i965/intel_batchbuffer.c      | 214 +++++++-------
 src/mesa/drivers/dri/i965/intel_batchbuffer.h      |  88 +++---
 src/mesa/drivers/dri/i965/intel_blit.c             |  65 ++---
 src/mesa/drivers/dri/i965/intel_blit.h             |  10 +-
 src/mesa/drivers/dri/i965/intel_buffer_objects.c   | 194 +++++++------
 src/mesa/drivers/dri/i965/intel_buffer_objects.h   |  14 +-
 src/mesa/drivers/dri/i965/intel_buffers.c          |  34 ++-
 src/mesa/drivers/dri/i965/intel_buffers.h          |   5 +-
 src/mesa/drivers/dri/i965/intel_context.c          | 273 ++++++++----------
 src/mesa/drivers/dri/i965/intel_context.h          | 155 +---------
 src/mesa/drivers/dri/i965/intel_extensions.c       |  19 +-
 src/mesa/drivers/dri/i965/intel_fbo.c              | 106 ++++---
 src/mesa/drivers/dri/i965/intel_fbo.h              |  11 +-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c      | 318 ++++++++++-----------
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h      |  55 ++--
 src/mesa/drivers/dri/i965/intel_pixel.c            |   2 +-
 src/mesa/drivers/dri/i965/intel_pixel_bitmap.c     |  14 +-
 src/mesa/drivers/dri/i965/intel_pixel_copy.c       |  12 +-
 src/mesa/drivers/dri/i965/intel_pixel_draw.c       |   2 +-
 src/mesa/drivers/dri/i965/intel_pixel_read.c       |  26 +-
 src/mesa/drivers/dri/i965/intel_regions.c          |   2 +-
 src/mesa/drivers/dri/i965/intel_regions.h          |   2 +-
 src/mesa/drivers/dri/i965/intel_screen.c           |  34 +--
 src/mesa/drivers/dri/i965/intel_screen.h           |   2 +-
 src/mesa/drivers/dri/i965/intel_state.c            |   2 +-
 src/mesa/drivers/dri/i965/intel_syncobj.c          |   8 +-
 src/mesa/drivers/dri/i965/intel_tex.c              |  16 +-
 src/mesa/drivers/dri/i965/intel_tex.h              |   6 +-
 src/mesa/drivers/dri/i965/intel_tex_copy.c         |  13 +-
 src/mesa/drivers/dri/i965/intel_tex_image.c        |  35 ++-
 src/mesa/drivers/dri/i965/intel_tex_subimage.c     |  28 +-
 src/mesa/drivers/dri/i965/intel_tex_validate.c     |  12 +-
 src/mesa/drivers/dri/i965/test_eu_compact.c        |  12 +-
 .../dri/i965/test_vec4_register_coalesce.cpp       |   6 +-
 130 files changed, 2055 insertions(+), 2401 deletions(-)


More information about the mesa-dev mailing list