[Mesa-dev] [PATCH 00/17] i965: More compiler cleanups

Jason Ekstrand jason at jlekstrand.net
Thu Oct 8 17:22:32 PDT 2015


This series contains even more compiler code-shuffling and cleanups.  In
particular, it gets us down to the point where we can, for the most part,
just go NIR -> binary.  It also rolls the entire compiler API into a single
header file with a bunch of structs and 6 functions.  It also reworks the
emit functions (now named compile) to set up some of prog_data for you.

Sound too good to be true?  Well, that's because it is.  I haven't had the
time or mental energy to re-work geometry shaders where most of the
interesting prog_data setup is.  Also, we still do have to pass in some
gl_program a few places to do workarounds on older hardware.  That said,
the interface between compiler and driver is a whole lot nicer than it used
to be.

Jason Ekstrand (17):
  i965/asm: Explicitly use a nir_instr for IR annotations
  nir: Add a label to nir_shader_info
  mesa: Move gl_frag_depth_layout from mtypes.h to shader_enums.h
  nir/info: Move the GS info into a stage-specific info union
  nir/info: Add compute shader local size to nir_shader_info
  nir/info: Add a few bits of info for fragment shaders
  i965/fs: Remove the gl_program from the generator
  i965/vec4: Remove gl_program and gl_shader_program from the generator
  i965: Use a const nir_shader in backend_shader
  i965/vs: Move use_legacy_snorm_formula into the shader key
  i965/fs: Rework wm_fs_emit to take a nir_shader and a brw_compiler
  i965/vs: Rework vs_emit to take a nir_shader and a brw_compiler
  i965/gs: Rework gs_emit to take a nir_shader and a brw_compiler
  i965/cs: Rework cs_emit to take a nir_shader and a brw_compiler
  i965/fs: Move some of the prog_data setup into brw_wm_emit
  i965: Rename brw_foo_emit to brw_compile_foo
  i965: Move the entire compiler API into a single file

 src/glsl/nir/glsl_to_nir.cpp                      |  31 +-
 src/glsl/nir/nir.h                                |  34 ++-
 src/glsl/nir/nir_sweep.c                          |   2 +
 src/glsl/shader_enums.h                           |  17 ++
 src/mesa/drivers/dri/i965/Makefile.sources        |   1 +
 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp   |   2 +-
 src/mesa/drivers/dri/i965/brw_context.c           |   2 +-
 src/mesa/drivers/dri/i965/brw_context.h           | 353 +---------------------
 src/mesa/drivers/dri/i965/brw_cs.c                |  10 +-
 src/mesa/drivers/dri/i965/brw_cs.h                |  15 -
 src/mesa/drivers/dri/i965/brw_fs.cpp              | 216 +++++++++----
 src/mesa/drivers/dri/i965/brw_fs.h                |   5 +-
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp    |   5 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp      |   2 +-
 src/mesa/drivers/dri/i965/brw_gs.c                |   6 +-
 src/mesa/drivers/dri/i965/brw_program.h           | 124 +-------
 src/mesa/drivers/dri/i965/brw_shader.cpp          |   2 +-
 src/mesa/drivers/dri/i965/brw_shader.h            |  62 +---
 src/mesa/drivers/dri/i965/brw_vec4.cpp            |  76 ++---
 src/mesa/drivers/dri/i965/brw_vec4.h              |  12 +-
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp  |  26 +-
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp |  64 ++--
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h   |  32 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp    |   2 +-
 src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp |  11 +-
 src/mesa/drivers/dri/i965/brw_vs.c                |  17 +-
 src/mesa/drivers/dri/i965/brw_vs.h                |  15 +-
 src/mesa/drivers/dri/i965/brw_wm.c                | 112 +------
 src/mesa/drivers/dri/i965/brw_wm.h                |  15 -
 src/mesa/drivers/dri/i965/gen6_gs_visitor.h       |   2 +-
 src/mesa/drivers/dri/i965/intel_asm_annotation.c  |  17 +-
 src/mesa/drivers/dri/i965/intel_asm_annotation.h  |   3 +-
 src/mesa/main/mtypes.h                            |  18 --
 src/mesa/program/prog_to_nir.c                    |   6 +
 34 files changed, 370 insertions(+), 947 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list