[Mesa-dev] [PATCH 8/9] nir: move to compiler

Matt Turner mattst88 at gmail.com
Wed Nov 25 14:01:34 PST 2015


On Wed, Nov 25, 2015 at 1:32 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  Android.mk                                         |   1 +
>  configure.ac                                       |   1 +
>  src/Makefile.am                                    |   1 +
>  src/{glsl => compiler}/nir/.gitignore              |   0
>  src/compiler/nir/Android.gen.mk                    |  83 +++++++++++++++++
>  src/compiler/nir/Android.mk                        |  52 +++++++++++
>  src/compiler/nir/Makefile.am                       | 100 +++++++++++++++++++++
>  src/compiler/nir/Makefile.sources                  |  71 +++++++++++++++
>  src/{glsl => compiler}/nir/README                  |   0
>  src/{glsl => compiler}/nir/glsl_to_nir.cpp         |   8 +-
>  src/{glsl => compiler}/nir/glsl_to_nir.h           |   2 +-
>  src/{glsl => compiler}/nir/nir.c                   |   0
>  src/{glsl => compiler}/nir/nir.h                   |   2 +-
>  src/{glsl => compiler}/nir/nir_algebraic.py        |   0
>  src/{glsl => compiler}/nir/nir_array.h             |   0
>  src/{glsl => compiler}/nir/nir_builder.h           |   0
>  .../nir/nir_builder_opcodes_h.py                   |   0
>  src/{glsl => compiler}/nir/nir_clone.c             |   0
>  .../nir/nir_constant_expressions.h                 |   0
>  .../nir/nir_constant_expressions.py                |   0
>  src/{glsl => compiler}/nir/nir_control_flow.c      |   0
>  src/{glsl => compiler}/nir/nir_control_flow.h      |   0
>  .../nir/nir_control_flow_private.h                 |   0
>  src/{glsl => compiler}/nir/nir_dominance.c         |   0
>  src/{glsl => compiler}/nir/nir_from_ssa.c          |   0
>  src/{glsl => compiler}/nir/nir_gs_count_vertices.c |   0
>  src/{glsl => compiler}/nir/nir_instr_set.c         |   0
>  src/{glsl => compiler}/nir/nir_instr_set.h         |   0
>  src/{glsl => compiler}/nir/nir_intrinsics.c        |   0
>  src/{glsl => compiler}/nir/nir_intrinsics.h        |   0
>  src/{glsl => compiler}/nir/nir_liveness.c          |   0
>  .../nir/nir_lower_alu_to_scalar.c                  |   0
>  src/{glsl => compiler}/nir/nir_lower_atomics.c     |   6 +-
>  src/{glsl => compiler}/nir/nir_lower_clip.c        |   0
>  .../nir/nir_lower_global_vars_to_local.c           |   0
>  .../nir/nir_lower_gs_intrinsics.c                  |   0
>  src/{glsl => compiler}/nir/nir_lower_idiv.c        |   0
>  src/{glsl => compiler}/nir/nir_lower_io.c          |   0
>  .../nir/nir_lower_load_const_to_scalar.c           |   0
>  .../nir/nir_lower_locals_to_regs.c                 |   0
>  .../nir/nir_lower_outputs_to_temporaries.c         |   0
>  .../nir/nir_lower_phis_to_scalar.c                 |   0
>  src/{glsl => compiler}/nir/nir_lower_samplers.c    |  10 +--
>  .../nir/nir_lower_system_values.c                  |   0
>  src/{glsl => compiler}/nir/nir_lower_tex.c         |   0
>  .../nir/nir_lower_to_source_mods.c                 |   0
>  .../nir/nir_lower_two_sided_color.c                |   0
>  src/{glsl => compiler}/nir/nir_lower_var_copies.c  |   0
>  src/{glsl => compiler}/nir/nir_lower_vars_to_ssa.c |   0
>  src/{glsl => compiler}/nir/nir_lower_vec_to_movs.c |   0
>  src/{glsl => compiler}/nir/nir_metadata.c          |   0
>  .../nir/nir_move_vec_src_uses_to_dest.c            |   0
>  .../nir/nir_normalize_cubemap_coords.c             |   0
>  src/{glsl => compiler}/nir/nir_opcodes.py          |   0
>  src/{glsl => compiler}/nir/nir_opcodes_c.py        |   0
>  src/{glsl => compiler}/nir/nir_opcodes_h.py        |   0
>  src/{glsl => compiler}/nir/nir_opt_algebraic.py    |   0
>  .../nir/nir_opt_constant_folding.c                 |   0
>  .../nir/nir_opt_copy_propagate.c                   |   0
>  src/{glsl => compiler}/nir/nir_opt_cse.c           |   0
>  src/{glsl => compiler}/nir/nir_opt_dce.c           |   0
>  src/{glsl => compiler}/nir/nir_opt_dead_cf.c       |   0
>  src/{glsl => compiler}/nir/nir_opt_gcm.c           |   0
>  .../nir/nir_opt_global_to_local.c                  |   0
>  .../nir/nir_opt_peephole_select.c                  |   0
>  src/{glsl => compiler}/nir/nir_opt_remove_phis.c   |   0
>  src/{glsl => compiler}/nir/nir_opt_undef.c         |   0
>  src/{glsl => compiler}/nir/nir_print.c             |   0
>  .../nir/nir_remove_dead_variables.c                |   0
>  src/{glsl => compiler}/nir/nir_search.c            |   0
>  src/{glsl => compiler}/nir/nir_search.h            |   0
>  src/{glsl => compiler}/nir/nir_split_var_copies.c  |   0
>  src/{glsl => compiler}/nir/nir_sweep.c             |   0
>  src/{glsl => compiler}/nir/nir_to_ssa.c            |   0
>  src/{glsl => compiler}/nir/nir_validate.c          |   0
>  src/{glsl => compiler}/nir/nir_vla.h               |   0
>  src/{glsl => compiler}/nir/nir_worklist.c          |   0
>  src/{glsl => compiler}/nir/nir_worklist.h          |   0
>  .../nir/tests/control_flow_tests.cpp               |   0
>  src/gallium/auxiliary/Makefile.am                  |   2 +-
>  src/gallium/auxiliary/nir/tgsi_to_nir.c            |   6 +-
>  src/gallium/auxiliary/nir/tgsi_to_nir.h            |   2 +-
>  src/gallium/drivers/freedreno/Makefile.am          |   4 +-
>  src/gallium/drivers/freedreno/ir3/ir3_nir.h        |   2 +-
>  .../drivers/freedreno/ir3/ir3_nir_lower_if_else.c  |   4 +-
>  src/gallium/drivers/vc4/Makefile.am                |   2 +-
>  src/gallium/drivers/vc4/vc4_nir_lower_blend.c      |   5 +-
>  src/gallium/drivers/vc4/vc4_nir_lower_io.c         |   5 +-
>  src/gallium/drivers/vc4/vc4_program.c              |   5 +-
>  src/gallium/drivers/vc4/vc4_qir.h                  |   2 +-
>  src/gallium/targets/pipe-loader/Makefile.am        |   2 +-
>  src/gallium/targets/xa/Makefile.am                 |   2 +-
>  src/glsl/Android.gen.mk                            |  56 +-----------
>  src/glsl/Android.mk                                |   5 +-
>  src/glsl/Makefile.am                               |  62 +------------
>  src/glsl/Makefile.sources                          |  71 ---------------
>  src/glsl/ir_hierarchical_visitor.h                 |   2 +
>  src/glsl/ir_visitor.h                              |   2 +
>  src/mesa/Android.libmesa_dricore.mk                |   1 -
>  src/mesa/Android.libmesa_glsl_utils.mk             |   2 -
>  src/mesa/Android.libmesa_st_mesa.mk                |   1 -
>  src/mesa/Makefile.sources                          |   2 -
>  src/mesa/drivers/dri/i965/Makefile.am              |   3 +-
>  src/mesa/drivers/dri/i965/brw_fs.h                 |   2 +-
>  src/mesa/drivers/dri/i965/brw_nir.c                |   2 +-
>  src/mesa/drivers/dri/i965/brw_nir.h                |   2 +-
>  src/mesa/drivers/dri/i965/brw_vec4.h               |   3 +-
>  src/mesa/drivers/dri/i965/intel_asm_annotation.c   |   2 +-
>  src/mesa/drivers/dri/i965/intel_screen.c           |   2 +-
>  src/mesa/program/Android.mk                        |   1 -
>  src/mesa/program/prog_to_nir.c                     |   4 +-
>  111 files changed, 367 insertions(+), 238 deletions(-)
>  rename src/{glsl => compiler}/nir/.gitignore (100%)
>  create mode 100644 src/compiler/nir/Android.gen.mk
>  create mode 100644 src/compiler/nir/Android.mk
>  create mode 100644 src/compiler/nir/Makefile.am
>  create mode 100644 src/compiler/nir/Makefile.sources
>  rename src/{glsl => compiler}/nir/README (100%)
>  rename src/{glsl => compiler}/nir/glsl_to_nir.cpp (99%)
>  rename src/{glsl => compiler}/nir/glsl_to_nir.h (97%)
>  rename src/{glsl => compiler}/nir/nir.c (100%)
>  rename src/{glsl => compiler}/nir/nir.h (99%)
>  rename src/{glsl => compiler}/nir/nir_algebraic.py (100%)
>  rename src/{glsl => compiler}/nir/nir_array.h (100%)
>  rename src/{glsl => compiler}/nir/nir_builder.h (100%)
>  rename src/{glsl => compiler}/nir/nir_builder_opcodes_h.py (100%)
>  rename src/{glsl => compiler}/nir/nir_clone.c (100%)
>  rename src/{glsl => compiler}/nir/nir_constant_expressions.h (100%)
>  rename src/{glsl => compiler}/nir/nir_constant_expressions.py (100%)
>  rename src/{glsl => compiler}/nir/nir_control_flow.c (100%)
>  rename src/{glsl => compiler}/nir/nir_control_flow.h (100%)
>  rename src/{glsl => compiler}/nir/nir_control_flow_private.h (100%)
>  rename src/{glsl => compiler}/nir/nir_dominance.c (100%)
>  rename src/{glsl => compiler}/nir/nir_from_ssa.c (100%)
>  rename src/{glsl => compiler}/nir/nir_gs_count_vertices.c (100%)
>  rename src/{glsl => compiler}/nir/nir_instr_set.c (100%)
>  rename src/{glsl => compiler}/nir/nir_instr_set.h (100%)
>  rename src/{glsl => compiler}/nir/nir_intrinsics.c (100%)
>  rename src/{glsl => compiler}/nir/nir_intrinsics.h (100%)
>  rename src/{glsl => compiler}/nir/nir_liveness.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_alu_to_scalar.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_atomics.c (99%)
>  rename src/{glsl => compiler}/nir/nir_lower_clip.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_global_vars_to_local.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_gs_intrinsics.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_idiv.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_io.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_load_const_to_scalar.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_locals_to_regs.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_outputs_to_temporaries.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_phis_to_scalar.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_samplers.c (99%)
>  rename src/{glsl => compiler}/nir/nir_lower_system_values.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_tex.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_to_source_mods.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_two_sided_color.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_var_copies.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_vars_to_ssa.c (100%)
>  rename src/{glsl => compiler}/nir/nir_lower_vec_to_movs.c (100%)
>  rename src/{glsl => compiler}/nir/nir_metadata.c (100%)
>  rename src/{glsl => compiler}/nir/nir_move_vec_src_uses_to_dest.c (100%)
>  rename src/{glsl => compiler}/nir/nir_normalize_cubemap_coords.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opcodes.py (100%)
>  rename src/{glsl => compiler}/nir/nir_opcodes_c.py (100%)
>  rename src/{glsl => compiler}/nir/nir_opcodes_h.py (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_algebraic.py (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_constant_folding.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_copy_propagate.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_cse.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_dce.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_dead_cf.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_gcm.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_global_to_local.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_peephole_select.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_remove_phis.c (100%)
>  rename src/{glsl => compiler}/nir/nir_opt_undef.c (100%)
>  rename src/{glsl => compiler}/nir/nir_print.c (100%)
>  rename src/{glsl => compiler}/nir/nir_remove_dead_variables.c (100%)
>  rename src/{glsl => compiler}/nir/nir_search.c (100%)
>  rename src/{glsl => compiler}/nir/nir_search.h (100%)
>  rename src/{glsl => compiler}/nir/nir_split_var_copies.c (100%)
>  rename src/{glsl => compiler}/nir/nir_sweep.c (100%)
>  rename src/{glsl => compiler}/nir/nir_to_ssa.c (100%)
>  rename src/{glsl => compiler}/nir/nir_validate.c (100%)
>  rename src/{glsl => compiler}/nir/nir_vla.h (100%)
>  rename src/{glsl => compiler}/nir/nir_worklist.c (100%)
>  rename src/{glsl => compiler}/nir/nir_worklist.h (100%)
>  rename src/{glsl => compiler}/nir/tests/control_flow_tests.cpp (100%)
>
> diff --git a/Android.mk b/Android.mk
> index 9b140a7..9b0d7bf 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -87,6 +87,7 @@ SUBDIRS := \
>         src/loader \
>         src/mapi \
>         src/compiler \
> +       src/compiler/nir \
>         src/glsl \
>         src/mesa \
>         src/util \
> diff --git a/configure.ac b/configure.ac
> index fcffc19..266d9b6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2347,6 +2347,7 @@ dnl Substitute the config
>  AC_CONFIG_FILES([Makefile
>                 src/Makefile
>                 src/compiler/Makefile
> +               src/compiler/nir/Makefile
>                 src/egl/Makefile
>                 src/egl/main/egl.pc
>                 src/egl/wayland/wayland-drm/Makefile
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 6357d10..c7f274a 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -23,6 +23,7 @@ SUBDIRS = . gtest util mapi/glapi/gen mapi
>
>  # XXX: conditionally include
>  SUBDIRS += compiler
> +SUBDIRS += compiler/nir

We have a non-recursive build in src/glsl today. I don't want to go backwards.


More information about the mesa-dev mailing list