[Mesa-dev] [PATCH 00/23] i965: Divorce the compiler from brw_context

Jason Ekstrand jason at jlekstrand.net
Fri Apr 17 19:11:40 PDT 2015


This is a series I started working on this week to try and pull as much of
brw_context out of the compiler as possible.  With this series, the only
major remaining connections to brw/gl_context are a few trivial things such
as calls to _mesa_problem which should be asserts and shader time.

Why do we want to do this?  First off, as you can see by the first 15
patches or so, we don't need brw_context for anything having to do with
codegen other than the debug log hook.  Second, it would be nice to be able
to pull the compiler out of the i965 backend for things such as offline
compiling.

Jason Ekstrand (23):
  i965: Remove the context parameter from brw_texture_offset
  i965: Do better fake context setup in unit tests
  i965/eu: Add a devinfo parameter to brw_compile
  i965: Make the brw_inst helpers take a device_info instead of a
    context
  i965: Make instruction compaction take a device_info instead of a
    context
  i965: Make the disassembler take a device_info instead of a context
  i965: Remove the context field from brw_compiler
  i965/fs: Remove the GL context from the generator
  i965: Make the annotation code take a device_info instead of a context
  i965/device_info: Add a HSW_FEATURESS macro
  i965/device_info: Add a supports_simd16_3src flag
  i965/fs: Add a devinfo field to the generator and use it for gen
    checks
  i965/vec4: Add a devinfo field to the generator and use it for gen
    checks
  i965: Remove remaining uses of ctx->Const.UniformBooleanTrue in
    visitors
  i965: Add a devinfo field to backend_visitor and use it for gen checks
  i965: Use device_info instead of the context in instruction scheduling
  i965: Use device_info instead of the context for computing vue maps
  i965: Rename brw_compile to brw_codegen
  i965: Add a brw_compiler structure and store the register sets in it
  i965: Plumb compiler debug logging through a function pointer in
    brw_compiler
  i965: Remove the dependance on brw_context from the generators
  i965: Move INTEL_DEBUG variable parsing to screan creation time
  i965: Add compiler options to brw_compiler

 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp    |    3 +-
 src/mesa/drivers/dri/i965/brw_clip.c               |    5 +-
 src/mesa/drivers/dri/i965/brw_clip.h               |    2 +-
 src/mesa/drivers/dri/i965/brw_clip_line.c          |   36 +-
 src/mesa/drivers/dri/i965/brw_clip_tri.c           |   65 +-
 src/mesa/drivers/dri/i965/brw_clip_unfilled.c      |   48 +-
 src/mesa/drivers/dri/i965/brw_clip_util.c          |   32 +-
 src/mesa/drivers/dri/i965/brw_context.c            |   79 +-
 src/mesa/drivers/dri/i965/brw_context.h            |   14 +-
 src/mesa/drivers/dri/i965/brw_device_info.c        |   37 +-
 src/mesa/drivers/dri/i965/brw_device_info.h        |    3 +-
 src/mesa/drivers/dri/i965/brw_disasm.c             |  600 +++++-----
 src/mesa/drivers/dri/i965/brw_eu.c                 |   71 +-
 src/mesa/drivers/dri/i965/brw_eu.h                 |  154 +--
 src/mesa/drivers/dri/i965/brw_eu_compact.c         |  320 +++---
 src/mesa/drivers/dri/i965/brw_eu_emit.c            | 1153 ++++++++++----------
 src/mesa/drivers/dri/i965/brw_eu_util.c            |   10 +-
 src/mesa/drivers/dri/i965/brw_ff_gs.c              |    9 +-
 src/mesa/drivers/dri/i965/brw_ff_gs.h              |    4 +-
 src/mesa/drivers/dri/i965/brw_ff_gs_emit.c         |   33 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp               |   81 +-
 src/mesa/drivers/dri/i965/brw_fs.h                 |    8 +-
 .../drivers/dri/i965/brw_fs_combine_constants.cpp  |   10 +-
 .../drivers/dri/i965/brw_fs_copy_propagation.cpp   |   10 +-
 src/mesa/drivers/dri/i965/brw_fs_fp.cpp            |    4 +-
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp     |  220 ++--
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp           |   44 +-
 .../dri/i965/brw_fs_peephole_predicated_break.cpp  |    2 +-
 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp  |   64 +-
 src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp  |    4 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |  114 +-
 src/mesa/drivers/dri/i965/brw_gs.c                 |   12 +-
 src/mesa/drivers/dri/i965/brw_gs.h                 |    2 +-
 src/mesa/drivers/dri/i965/brw_inst.h               |  140 +--
 src/mesa/drivers/dri/i965/brw_ir_fs.h              |    2 +-
 src/mesa/drivers/dri/i965/brw_ir_vec4.h            |    2 +-
 src/mesa/drivers/dri/i965/brw_reg.h                |    4 +-
 .../drivers/dri/i965/brw_schedule_instructions.cpp |   21 +-
 src/mesa/drivers/dri/i965/brw_sf.c                 |    5 +-
 src/mesa/drivers/dri/i965/brw_sf.h                 |    2 +-
 src/mesa/drivers/dri/i965/brw_sf_emit.c            |   37 +-
 src/mesa/drivers/dri/i965/brw_shader.cpp           |   94 +-
 src/mesa/drivers/dri/i965/brw_shader.h             |   66 +-
 src/mesa/drivers/dri/i965/brw_state_dump.c         |    4 +-
 src/mesa/drivers/dri/i965/brw_vec4.cpp             |   30 +-
 src/mesa/drivers/dri/i965/brw_vec4.h               |    7 +-
 .../drivers/dri/i965/brw_vec4_copy_propagation.cpp |   20 +-
 .../dri/i965/brw_vec4_dead_code_eliminate.cpp      |    6 +-
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp   |  137 ++-
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp  |    7 +-
 .../drivers/dri/i965/brw_vec4_reg_allocate.cpp     |   38 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     |  136 ++-
 src/mesa/drivers/dri/i965/brw_vec4_vp.cpp          |    4 +-
 src/mesa/drivers/dri/i965/brw_vs.c                 |   14 +-
 src/mesa/drivers/dri/i965/brw_vs.h                 |    2 +-
 src/mesa/drivers/dri/i965/brw_wm.c                 |    4 +-
 src/mesa/drivers/dri/i965/brw_wm.h                 |    2 +-
 src/mesa/drivers/dri/i965/intel_asm_annotation.c   |    9 +-
 src/mesa/drivers/dri/i965/intel_asm_annotation.h   |    5 +-
 src/mesa/drivers/dri/i965/intel_debug.c            |   13 +-
 src/mesa/drivers/dri/i965/intel_debug.h            |    4 +-
 src/mesa/drivers/dri/i965/intel_screen.c           |   34 +-
 src/mesa/drivers/dri/i965/intel_screen.h           |   48 +-
 src/mesa/drivers/dri/i965/test_eu_compact.c        |   84 +-
 .../drivers/dri/i965/test_fs_cmod_propagation.cpp  |    6 +-
 .../dri/i965/test_fs_saturate_propagation.cpp      |    6 +-
 .../dri/i965/test_vec4_copy_propagation.cpp        |    6 +-
 .../dri/i965/test_vec4_register_coalesce.cpp       |    6 +-
 68 files changed, 2152 insertions(+), 2106 deletions(-)

-- 
2.3.5



More information about the mesa-dev mailing list