[Mesa-dev] [PATCH 00/13] i965: Pull shader, prog, and shader_prog out of the

Jason Ekstrand jason at jlekstrand.net
Thu Oct 1 18:50:26 PDT 2015


This series does a bunch of code-shuffling with the end objective of
getting the gl_* data structures out of the backend compiler.  Now that we
have NIR, we would like the compiler to be a NIR -> binary translator and
not be loaded full of mesa and GL-specific stuff.  This series gets us 95%
of the way there.  Unfortunately, we still have to pass gl_program into
geometry shaders for transform-fedback and, for fragment shaders, we need
to pass in gl_shader_program so that we can fix up TEXTURE_RECTANGLE on
older hardware (pre-Broadwell).

Incidentally, according to our CI system, this series fixes 2 piglit tests
on Iron Lake and GM45.  I have no idea why.

Jason Ekstrand (13):
  i965/shader: Pull assign_common_binding_table_offsets out of
    backend_shader
  i965: Move binding table setup to codegen time.
  i965: Move prog_data uniform setup to the codegen level
  nir/glsl: Take a gl_shader_program and a stage rather than a gl_shader
  nir: Add a a nir_shader_info struct
  nir: Move GS data to nir_shader_info
  i965/backend_shader: Add a field to store the NIR shader
  i965/cs: Remove the prog argument from local_id_payload_dwords
  i965/fs: Move sampler unit lookup into rescale_texcoord
  i965/fs: Use the nir info instead of pulling things out of
    [shader_]prog
  i965/vec4: Use nir info instead of pulling things out of [shader_]prog
  i965/fs,vec4: Get rid of the sanity_param_count
  i965/shader: Get rid of the shader, prog, and shader_prog fields

 src/glsl/nir/glsl_to_nir.cpp                      |  30 +++++-
 src/glsl/nir/glsl_to_nir.h                        |   3 +-
 src/glsl/nir/nir.c                                |   4 +-
 src/glsl/nir/nir.h                                |  50 ++++++++--
 src/glsl/nir/nir_lower_gs_intrinsics.c            |   2 +-
 src/mesa/drivers/dri/i965/brw_cs.c                |  25 ++++-
 src/mesa/drivers/dri/i965/brw_cs.h                |   3 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp              | 106 +++++-----------------
 src/mesa/drivers/dri/i965/brw_fs.h                |  20 ++--
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp          |  57 ++++--------
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp      |  24 +++--
 src/mesa/drivers/dri/i965/brw_gs.c                |  24 ++++-
 src/mesa/drivers/dri/i965/brw_nir.c               |   3 +-
 src/mesa/drivers/dri/i965/brw_shader.cpp          |  30 +++---
 src/mesa/drivers/dri/i965/brw_shader.h            |  21 +++--
 src/mesa/drivers/dri/i965/brw_vec4.cpp            |  34 ++-----
 src/mesa/drivers/dri/i965/brw_vec4.h              |  13 +--
 src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp     |   6 +-
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp |  24 ++---
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h   |   5 +-
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp        |  41 +++------
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp    |   8 +-
 src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp |  11 +--
 src/mesa/drivers/dri/i965/brw_vs.c                |  14 +++
 src/mesa/drivers/dri/i965/brw_vs.h                |   4 +-
 src/mesa/drivers/dri/i965/brw_wm.c                |  33 ++++++-
 src/mesa/drivers/dri/i965/brw_wm_iz.cpp           |   3 +-
 src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp     |   9 --
 src/mesa/drivers/dri/i965/gen6_gs_visitor.h       |   4 +-
 src/mesa/drivers/dri/i965/gen7_cs_state.c         |   7 +-
 src/mesa/program/prog_to_nir.c                    |  13 +++
 31 files changed, 333 insertions(+), 298 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list