[Mesa-dev] [PATCH 5/6] nir: remove dependency on glsl

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 13 08:22:16 PDT 2015


Hi Rob,

On 10 October 2015 at 19:47, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Move glsl_types into NIR, now that the dependency on glsl_symbol_table
> has been split out.
>
> Possibly makes sense to rename things at this point, but if we do that
> I'd like to keep it split out into a separate patch to make git history
> easier to follow (IMHO).
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
>  src/glsl/Makefile.am                               |    3 -
>  src/glsl/Makefile.sources                          |    4 +-
>  src/glsl/builtin_type_macros.h                     |  172 --
>  src/glsl/glsl_types.cpp                            | 1729 --------------------
>  src/glsl/glsl_types.h                              |  867 ----------
>  src/glsl/nir/builtin_type_macros.h                 |  172 ++
>  src/glsl/nir/glsl_types.cpp                        | 1729 ++++++++++++++++++++
>  src/glsl/nir/glsl_types.h                          |  867 ++++++++++
>  src/glsl/nir/nir_types.h                           |    2 +-
>  .../drivers/dri/i965/brw_cubemap_normalize.cpp     |    2 +-
>  src/mesa/drivers/dri/i965/brw_fs.cpp               |    2 +-
>  src/mesa/drivers/dri/i965/brw_fs.h                 |    2 +-
>  .../dri/i965/brw_fs_channel_expressions.cpp        |    2 +-
>  src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp  |    2 +-
>  .../drivers/dri/i965/brw_fs_vector_splitting.cpp   |    2 +-
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |    2 +-
>  .../dri/i965/brw_lower_unnormalized_offset.cpp     |    2 +-
>  .../drivers/dri/i965/brw_schedule_instructions.cpp |    2 +-
>  src/mesa/main/ff_fragment_shader.cpp               |    2 +-
>  src/mesa/main/uniforms.h                           |    2 +-
>  src/mesa/program/ir_to_mesa.cpp                    |    2 +-
>  src/mesa/program/sampler.cpp                       |    2 +-
>  22 files changed, 2784 insertions(+), 2787 deletions(-)
>  delete mode 100644 src/glsl/builtin_type_macros.h
>  delete mode 100644 src/glsl/glsl_types.cpp
>  delete mode 100644 src/glsl/glsl_types.h
>  create mode 100644 src/glsl/nir/builtin_type_macros.h
>  create mode 100644 src/glsl/nir/glsl_types.cpp
>  create mode 100644 src/glsl/nir/glsl_types.h
>
> diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
> index 347919b..437c6a5 100644
> --- a/src/glsl/Makefile.am
> +++ b/src/glsl/Makefile.am
> @@ -148,9 +148,6 @@ libglsl_la_SOURCES =                                        \
>
>
>  libnir_la_SOURCES =                                    \
> -       glsl_types.cpp                                  \
> -       builtin_types.cpp                               \
> -       glsl_symbol_table.cpp                           \
>         $(NIR_FILES)                                    \
>         $(NIR_GENERATED_FILES)
>
> diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
> index 436949c..6e61f23 100644
> --- a/src/glsl/Makefile.sources
> +++ b/src/glsl/Makefile.sources
> @@ -20,6 +20,8 @@ NIR_GENERATED_FILES = \
>  NIR_FILES = \
>         nir/glsl_to_nir.cpp \
>         nir/glsl_to_nir.h \
> +       nir/glsl_types.cpp \
> +       nir/glsl_types.h \
>         nir/nir.c \
>         nir/nir.h \
>         nir/nir_array.h \
> @@ -103,8 +105,6 @@ LIBGLSL_FILES = \
>         glsl_parser_extras.h \
>         glsl_symbol_table.cpp \
>         glsl_symbol_table.h \
> -       glsl_types.cpp \
> -       glsl_types.h \
>         hir_field_selection.cpp \
>         ir_basic_block.cpp \
>         ir_basic_block.h \
Can we split this into two (or more) patches.
 - move the files from glsl to glsl/nir, updating scons/android. note
scons is missing everything NIR related.
 - fold/nuke the additional glsl requirements, from NIR.

>From autotools side alone the patch looks great.

Thank you
Emil

P.S. Please use -M for git to detect code movement when generating the patch.


More information about the mesa-dev mailing list