[Mesa-dev] [PATCH 00/32] i965/blorp: Use genxml for state setup

Jason Ekstrand jason at jlekstrand.net
Thu Aug 11 21:14:57 UTC 2016


This patch series is the next on the way towards generalizing blorp for
usin in Vulkan.  At this point, I'd say the project is about 80% complete.
This series only applies on top of the last two blorp isl series which are
still undergoing review.

Patches 1-11 make minor genxml improvements.  Some of this is to make gen6
better and more like gen7-9.  The others are just general improvements that
made converting blorp easier.

Patches 12-14 make a few minor changes to i965 so that we can include
brw_state.h and brw_context.h without brw_defines.h.

Patches 15-23 re-arrange the state setup code in blorp to make the
different gens emit the packets more-or-less in the same order.  This was
very helpful when trying to debug problems when switching to genxml because
there should not be substantial changes in the batch between patch 23 and
the end of the series.

Patches 24-32 convert all of the blorp state setup to using genxml in a
single file that gets recompiled 5 times, one for each gen.  I'm extremely
happy with the end result where almost all of the code is shared across
gens.  The one exception is WM and SF setup which is so different that we
really need different code for gen6, gen7, and gen8.

This series can be found here:

https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/blorp-genxml

Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>

Jason Ekstrand (32):
  genxml/gen6: Add uint MOCS fields for most things
  genxml/gen6: Add a Surface Base Address field to HIER_DEPTH_BUFFER
  genxml/gen6: Fix the length of 3DSTATE_WM
  genxml/gen6: Add the 3D_Prim_Topo_Type enum
  genxml/gen6: Make "Depth Clear Value" a uint
  genxml: Add a uint MOCS field to DEPTH_BUFFER packets
  genxml/gen6: Make SAMPLER_STATE look a bit more like gen7
  genxml: Make VERTEX_ELEMENT_STATE::Valid a bool
  genxml: Make a couple of VERTEX_BUFFER_STATE fields boolean
  genxml: Add a uint MOCS field to VERTEX_BUFFER_STATE
  genxml/gen9: Make 3DSTATE_SBE::AttributeActiveComponentFormat an array
  i965/state: Move is_drawing_lines/points to gen6_clip_state.c
  i965: Stop including brw_defines.h in brw_state.h
  i965: Roll intel_reg.h into brw_defines.h
  i965/blorp: Make gen6 VS and GS disable helpers static
  i965/blorp: Move the non-static blorp state setup helpers to another
    file
  i965/blorp: Don't clear an empty region
  i965/blorp/gen6: Move constant disables higher up
  i965/blorp/gen7-8: Emit depth stencil state with CC and BLEND
  i965/blorp/gen6-7: Move surfaces and samplers closer together
  i965/blorp/gen6-7: Move multisample setup to right after samplers
  i965/blorp/gen8: Move viewport setup to after wm state
  i965/blorp: Stop setting point and line rasterization rules
  i965/blorp/gen6: Use genxml packing structs for state setup
  i965: Move gen6_blorp.c to a file that gets recompiled per-gen
  i965/blorp: Add genxml-based dynamic state emit functions
  i965/blorp: Add genxml-based sampler state emit function
  i965/blorp: Add a helper for emitting surface states
  i965/blorp: Add genxml-based vertex setup helpers
  i965/blorp: Use genxml for gen7 state setup
  i965/blorp: Use genxml for gen8-9 state setup
  i965/blorp: Remove no longer used state setup helpers

 src/intel/genxml/gen6.xml                      |   93 +-
 src/intel/genxml/gen7.xml                      |    9 +-
 src/intel/genxml/gen75.xml                     |    9 +-
 src/intel/genxml/gen8.xml                      |    7 +-
 src/intel/genxml/gen9.xml                      |   42 +-
 src/intel/vulkan/genX_pipeline_util.h          |   38 +-
 src/mesa/drivers/dri/i965/Makefile.am          |   31 +-
 src/mesa/drivers/dri/i965/Makefile.sources     |   19 +-
 src/mesa/drivers/dri/i965/blorp.c              |    9 +-
 src/mesa/drivers/dri/i965/blorp_priv.h         |   94 +-
 src/mesa/drivers/dri/i965/brw_blorp.c          |    4 +
 src/mesa/drivers/dri/i965/brw_defines.h        |  273 ++++++
 src/mesa/drivers/dri/i965/brw_meta_util.c      |    1 +
 src/mesa/drivers/dri/i965/brw_pipe_control.c   |    2 +-
 src/mesa/drivers/dri/i965/brw_queryobj.c       |    1 -
 src/mesa/drivers/dri/i965/brw_state.h          |   56 +-
 src/mesa/drivers/dri/i965/gen6_blorp.c         |  965 ---------------------
 src/mesa/drivers/dri/i965/gen6_clip_state.c    |   54 +-
 src/mesa/drivers/dri/i965/gen6_queryobj.c      |    1 -
 src/mesa/drivers/dri/i965/gen6_sf_state.c      |    4 +-
 src/mesa/drivers/dri/i965/gen7_blorp.c         |  708 ---------------
 src/mesa/drivers/dri/i965/gen7_sf_state.c      |    2 +-
 src/mesa/drivers/dri/i965/gen8_blorp.c         |  578 -------------
 src/mesa/drivers/dri/i965/genX_blorp_exec.c    | 1103 ++++++++++++++++++++++++
 src/mesa/drivers/dri/i965/hsw_queryobj.c       |    1 -
 src/mesa/drivers/dri/i965/intel_batchbuffer.c  |    1 -
 src/mesa/drivers/dri/i965/intel_batchbuffer.h  |    1 -
 src/mesa/drivers/dri/i965/intel_blit.c         |    1 -
 src/mesa/drivers/dri/i965/intel_extensions.c   |    1 +
 src/mesa/drivers/dri/i965/intel_fbo.c          |    1 +
 src/mesa/drivers/dri/i965/intel_pixel_bitmap.c |    1 -
 src/mesa/drivers/dri/i965/intel_reg.h          |  297 -------
 src/mesa/drivers/dri/i965/intel_syncobj.c      |    1 -
 src/mesa/drivers/dri/i965/intel_tex.c          |    2 +-
 34 files changed, 1598 insertions(+), 2812 deletions(-)
 delete mode 100644 src/mesa/drivers/dri/i965/gen6_blorp.c
 delete mode 100644 src/mesa/drivers/dri/i965/gen7_blorp.c
 delete mode 100644 src/mesa/drivers/dri/i965/gen8_blorp.c
 create mode 100644 src/mesa/drivers/dri/i965/genX_blorp_exec.c
 delete mode 100644 src/mesa/drivers/dri/i965/intel_reg.h

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list