[Mesa-dev] [PATCH v2 19/25] i965: Move the back-end compiler to src/intel/compiler
Jason Ekstrand
jason at jlekstrand.net
Thu Mar 9 22:48:08 UTC 2017
On Thu, Mar 9, 2017 at 11:07 AM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:
> From: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Mostly a dummy git mv with a couple of noticable parts:
> - With the earlier header cleanups, nothing in src/intel depends
> files from src/mesa/drivers/dri/i965/
> - Both Autoconf and Android builds are addressed. Thanks to Mauro and
> Tapani for the fixups in the latter
> - brw_util.[ch] is not really compiler specific, so it's moved to i965.
>
> v2:
> - move brw_eu_defines.h instead of brw_defines.h
> - remove no-longer applicable includes
> - add missing vulkan/ prefix in the Android build (thanks Tapani)
>
> [Emil Velikov: commit message, various small fixes througout]
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/intel/Android.blorp.mk | 2 +-
> .../Android.gen.mk => intel/Android.compiler.mk} | 41 ++++++-
> src/intel/Android.isl.mk | 5 +-
> src/intel/Android.mk | 1 +
> src/intel/Makefile.am | 6 +-
> src/intel/Makefile.compiler.am | 121
> +++++++++++++++++++++
> src/intel/Makefile.sources | 90 +++++++++++++++
> src/intel/blorp/blorp.c | 4 +-
> src/intel/blorp/blorp_clear.c | 2 +-
> src/intel/blorp/blorp_priv.h | 2 +-
> src/intel/compiler/.gitignore | 10 ++
> .../dri/i965 => intel/compiler}/brw_cfg.cpp | 0
> .../drivers/dri/i965 => intel/compiler}/brw_cfg.h | 0
> .../dri/i965 => intel/compiler}/brw_compiler.c | 0
> .../dri/i965 => intel/compiler}/brw_compiler.h | 0
> .../compiler}/brw_dead_control_flow.cpp | 0
> .../compiler}/brw_dead_control_flow.h | 0
> .../dri/i965 => intel/compiler}/brw_disasm.c | 0
> .../drivers/dri/i965 => intel/compiler}/brw_eu.c | 0
> .../drivers/dri/i965 => intel/compiler}/brw_eu.h | 0
> .../dri/i965 => intel/compiler}/brw_eu_compact.c | 0
> .../dri/i965 => intel/compiler}/brw_eu_defines.h | 0
> .../dri/i965 => intel/compiler}/brw_eu_emit.c | 0
> .../dri/i965 => intel/compiler}/brw_eu_util.c | 0
> .../dri/i965 => intel/compiler}/brw_eu_validate.c | 0
> .../drivers/dri/i965 => intel/compiler}/brw_fs.cpp | 0
> .../drivers/dri/i965 => intel/compiler}/brw_fs.h | 0
> .../dri/i965 => intel/compiler}/brw_fs_builder.h | 0
> .../compiler}/brw_fs_cmod_propagation.cpp | 0
> .../compiler}/brw_fs_combine_constants.cpp | 0
> .../compiler}/brw_fs_copy_propagation.cpp | 0
> .../dri/i965 => intel/compiler}/brw_fs_cse.cpp | 0
> .../compiler}/brw_fs_dead_code_eliminate.cpp | 0
> .../i965 => intel/compiler}/brw_fs_generator.cpp | 0
> .../compiler}/brw_fs_live_variables.cpp | 0
> .../compiler}/brw_fs_live_variables.h | 0
> .../i965 => intel/compiler}/brw_fs_lower_d2x.cpp | 0
> .../i965 => intel/compiler}/brw_fs_lower_pack.cpp | 0
> .../dri/i965 => intel/compiler}/brw_fs_nir.cpp | 0
> .../compiler}/brw_fs_reg_allocate.cpp | 0
> .../compiler}/brw_fs_register_coalesce.cpp | 0
> .../compiler}/brw_fs_saturate_propagation.cpp | 0
> .../compiler}/brw_fs_sel_peephole.cpp | 0
> .../compiler}/brw_fs_surface_builder.cpp | 0
> .../compiler}/brw_fs_surface_builder.h | 0
> .../i965 => intel/compiler}/brw_fs_validate.cpp | 0
> .../dri/i965 => intel/compiler}/brw_fs_visitor.cpp | 0
> .../drivers/dri/i965 => intel/compiler}/brw_inst.h | 0
> .../compiler}/brw_interpolation_map.c | 0
> .../dri/i965 => intel/compiler}/brw_ir_allocator.h | 0
> .../dri/i965 => intel/compiler}/brw_ir_fs.h | 0
> .../dri/i965 => intel/compiler}/brw_ir_vec4.h | 0
> .../drivers/dri/i965 => intel/compiler}/brw_nir.c | 0
> .../drivers/dri/i965 => intel/compiler}/brw_nir.h | 0
> .../compiler}/brw_nir_analyze_boolean_resolves.c | 0
> .../compiler}/brw_nir_attribute_workarounds.c | 0
> .../i965 => intel/compiler}/brw_nir_intrinsics.c | 0
> .../compiler}/brw_nir_opt_peephole_ffma.c | 0
> .../compiler}/brw_nir_tcs_workarounds.c | 0
> .../compiler}/brw_nir_trig_workarounds.py | 0
> .../dri/i965 => intel/compiler}/brw_packed_float.c | 0
> .../compiler}/brw_predicated_break.cpp | 0
> .../drivers/dri/i965 => intel/compiler}/brw_reg.h | 0
> .../compiler}/brw_schedule_instructions.cpp | 0
> .../dri/i965 => intel/compiler}/brw_shader.cpp | 0
> .../dri/i965 => intel/compiler}/brw_shader.h | 0
> .../dri/i965 => intel/compiler}/brw_vec4.cpp | 0
> .../drivers/dri/i965 => intel/compiler}/brw_vec4.h | 0
> .../dri/i965 => intel/compiler}/brw_vec4_builder.h | 0
> .../compiler}/brw_vec4_cmod_propagation.cpp | 0
> .../compiler}/brw_vec4_copy_propagation.cpp | 0
> .../dri/i965 => intel/compiler}/brw_vec4_cse.cpp | 0
> .../compiler}/brw_vec4_dead_code_eliminate.cpp | 0
> .../i965 => intel/compiler}/brw_vec4_generator.cpp | 0
> .../i965 => intel/compiler}/brw_vec4_gs_nir.cpp | 0
> .../compiler}/brw_vec4_gs_visitor.cpp | 0
> .../i965 => intel/compiler}/brw_vec4_gs_visitor.h | 0
> .../compiler}/brw_vec4_live_variables.cpp | 0
> .../compiler}/brw_vec4_live_variables.h | 0
> .../dri/i965 => intel/compiler}/brw_vec4_nir.cpp | 0
> .../compiler}/brw_vec4_reg_allocate.cpp | 0
> .../compiler}/brw_vec4_surface_builder.cpp | 0
> .../compiler}/brw_vec4_surface_builder.h | 0
> .../dri/i965 => intel/compiler}/brw_vec4_tcs.cpp | 0
> .../dri/i965 => intel/compiler}/brw_vec4_tcs.h | 0
> .../dri/i965 => intel/compiler}/brw_vec4_tes.cpp | 0
> .../dri/i965 => intel/compiler}/brw_vec4_tes.h | 0
> .../i965 => intel/compiler}/brw_vec4_visitor.cpp | 0
> .../dri/i965 => intel/compiler}/brw_vec4_vs.h | 0
> .../compiler}/brw_vec4_vs_visitor.cpp | 0
> .../dri/i965 => intel/compiler}/brw_vue_map.c | 0
> .../dri/i965 => intel/compiler}/brw_wm_iz.cpp | 0
> .../i965 => intel/compiler}/gen6_gs_visitor.cpp | 0
> .../dri/i965 => intel/compiler}/gen6_gs_visitor.h | 0
> .../i965 => intel/compiler}/intel_asm_annotation.c | 0
> .../i965 => intel/compiler}/intel_asm_annotation.h | 0
> .../dri/i965 => intel/compiler}/test_eu_compact.c | 0
> .../i965 => intel/compiler}/test_eu_validate.cpp | 0
> .../compiler}/test_fs_cmod_propagation.cpp | 0
> .../compiler}/test_fs_copy_propagation.cpp | 0
> .../compiler}/test_fs_saturate_propagation.cpp | 0
> .../compiler}/test_vec4_cmod_propagation.cpp | 0
> .../compiler}/test_vec4_copy_propagation.cpp | 0
> .../compiler}/test_vec4_register_coalesce.cpp | 0
> .../compiler}/test_vf_float_conversions.cpp | 0
> src/intel/isl/isl_storage_image.c | 2 +-
> src/intel/tools/Makefile.am | 4 +-
> src/intel/tools/disasm.c | 4 +-
> src/intel/vulkan/Android.mk | 5 +-
> src/intel/vulkan/Makefile.am | 4 +-
> src/intel/vulkan/anv_pipeline.c | 2 +-
> src/intel/vulkan/anv_private.h | 2 +-
> src/mesa/drivers/dri/i965/.gitignore | 8 --
> src/mesa/drivers/dri/i965/Android.mk | 30 +----
> src/mesa/drivers/dri/i965/Makefile.am | 94 +---------------
> src/mesa/drivers/dri/i965/Makefile.sources | 93 +---------------
> src/mesa/drivers/dri/i965/brw_clip.h | 2 +-
> src/mesa/drivers/dri/i965/brw_context.h | 2 +-
> src/mesa/drivers/dri/i965/brw_cs.c | 2 +-
> src/mesa/drivers/dri/i965/brw_draw.c | 2 +-
> src/mesa/drivers/dri/i965/brw_ff_gs.h | 2 +-
> src/mesa/drivers/dri/i965/brw_gs.c | 2 +-
> src/mesa/drivers/dri/i965/brw_link.cpp | 2 +-
> src/mesa/drivers/dri/i965/brw_misc_state.c | 2 +-
> src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 3 +-
> src/mesa/drivers/dri/i965/brw_program.c | 2 +-
> src/mesa/drivers/dri/i965/brw_program.h | 2 +-
> src/mesa/drivers/dri/i965/brw_program_cache.c | 2 +-
> src/mesa/drivers/dri/i965/brw_sf.h | 2 +-
> src/mesa/drivers/dri/i965/brw_tcs.c | 2 +-
> src/mesa/drivers/dri/i965/brw_tes.c | 2 +-
> src/mesa/drivers/dri/i965/brw_util.c | 2 +-
> src/mesa/drivers/dri/i965/brw_vs.c | 2 +-
> src/mesa/drivers/dri/i965/brw_wm.c | 2 +-
> src/mesa/drivers/dri/i965/gen6_clip_state.c | 2 +-
> src/mesa/drivers/dri/i965/gen6_wm_state.c | 2 +-
> src/mesa/drivers/dri/i965/gen7_wm_state.c | 2 +-
> src/mesa/drivers/dri/i965/gen8_depth_state.c | 2 +-
> 138 files changed, 305 insertions(+), 272 deletions(-)
> rename src/{mesa/drivers/dri/i965/Android.gen.mk => intel/
> Android.compiler.mk} (58%)
> create mode 100644 src/intel/Makefile.compiler.am
> create mode 100644 src/intel/compiler/.gitignore
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_cfg.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_cfg.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_compiler.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_compiler.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_dead_control_flow.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_dead_control_flow.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_disasm.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu_compact.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu_defines.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu_emit.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu_util.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_eu_validate.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_builder.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_cmod_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_combine_constants.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_copy_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_cse.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_dead_code_eliminate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_generator.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_live_variables.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_live_variables.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_lower_d2x.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_lower_pack.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_nir.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_reg_allocate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_register_coalesce.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_saturate_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_sel_peephole.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_surface_builder.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_surface_builder.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_validate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_fs_visitor.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_inst.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_interpolation_map.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_ir_allocator.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_ir_fs.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_ir_vec4.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_analyze_boolean_resolves.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_attribute_workarounds.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_intrinsics.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_opt_peephole_ffma.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_tcs_workarounds.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_nir_trig_workarounds.py
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_packed_float.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_predicated_break.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_reg.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_schedule_instructions.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_shader.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_shader.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_builder.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_cmod_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_copy_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_cse.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_dead_code_eliminate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_generator.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_gs_nir.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_gs_visitor.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_gs_visitor.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_live_variables.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_live_variables.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_nir.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_reg_allocate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_surface_builder.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_surface_builder.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_tcs.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_tcs.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_tes.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_tes.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_visitor.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_vs.h (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vec4_vs_visitor.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_vue_map.c (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/brw_wm_iz.cpp (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/gen6_gs_visitor.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/gen6_gs_visitor.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/intel_asm_annotation.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/intel_asm_annotation.h
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_eu_compact.c
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_eu_validate.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_fs_cmod_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_fs_copy_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_fs_saturate_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_vec4_cmod_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_vec4_copy_propagation.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_vec4_register_coalesce.cpp
> (100%)
> rename src/{mesa/drivers/dri/i965 => intel/compiler}/test_vf_float_conversions.cpp
> (100%)
>
> diff --git a/src/intel/Android.blorp.mk b/src/intel/Android.blorp.mk
> index 7e7c8ae9f3..5297af2b7c 100644
> --- a/src/intel/Android.blorp.mk
> +++ b/src/intel/Android.blorp.mk
> @@ -37,7 +37,7 @@ LOCAL_C_INCLUDES := \
> $(MESA_TOP)/src/gallium/include \
> $(MESA_TOP)/src/mapi \
> $(MESA_TOP)/src/mesa \
> - $(MESA_TOP)/src/mesa/drivers/dri/i965
> + $(MESA_TOP)/src/intel
>
> LOCAL_STATIC_LIBRARIES := libmesa_nir
>
> diff --git a/src/mesa/drivers/dri/i965/Android.gen.mk b/src/intel/
> Android.compiler.mk
> similarity index 58%
> rename from src/mesa/drivers/dri/i965/Android.gen.mk
> rename to src/intel/Android.compiler.mk
> index c2b8dae339..8bbfb1cbd4 100644
> --- a/src/mesa/drivers/dri/i965/Android.gen.mk
> +++ b/src/intel/Android.compiler.mk
> @@ -1,4 +1,7 @@
> #
> +# Copyright (C) 2011 Intel Corporation
> +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe at gmail.com>
> +# Copyright (C) 2010-2011 LunarG
> # Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh at kernel.org>
> #
> # Permission is hereby granted, free of charge, to any person obtaining a
> @@ -20,21 +23,47 @@
> # DEALINGS IN THE SOFTWARE.
> #
>
> -ifeq ($(LOCAL_MODULE_CLASS),)
> -LOCAL_MODULE_CLASS := SHARED_LIBRARIES
> -endif
> +# ---------------------------------------
> +# Build libmesa_intel_compiler
> +# ---------------------------------------
> +
> +include $(CLEAR_VARS)
> +
> +LOCAL_MODULE := libmesa_intel_compiler
> +LOCAL_MODULE_CLASS := STATIC_LIBRARIES
> +
> +LOCAL_SRC_FILES := \
> + $(COMPILER_FILES)
> +
> +LOCAL_C_INCLUDES := \
> + $(MESA_TOP)/src/intel \
> + $(MESA_TOP)/src/mapi \
> + $(MESA_TOP)/src/mesa \
> + $(MESA_TOP)/src/gallium/auxiliary \
> + $(MESA_TOP)/src/gallium/include \
> + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,)/glsl
> \
> + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir
> \
> + $(MESA_TOP)/src/compiler/nir
> +
> +LOCAL_SHARED_LIBRARIES := \
> + libdrm_intel
>
> brw_nir_trig_workarounds_deps := \
> - $(LOCAL_PATH)/brw_nir_trig_workarounds.py \
> + $(LOCAL_PATH)/compiler/brw_nir_trig_workarounds.py \
> $(MESA_TOP)/src/compiler/nir/nir_algebraic.py
>
> intermediates := $(call local-generated-sources-dir)
>
> -$(intermediates)/brw_nir_trig_workarounds.c: $(brw_nir_trig_workarounds_
> deps)
> +$(intermediates)/compiler/brw_nir_trig_workarounds.c:
> $(brw_nir_trig_workarounds_deps)
> @mkdir -p $(dir $@)
> $(hide) PYTHONPATH=$(MESA_TOP)/src/compiler/nir $(MESA_PYTHON2)
> $< > $@
>
> LOCAL_STATIC_LIBRARIES = libmesa_genxml
>
> LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
> - $(i965_compiler_GENERATED_FILES))
> + $(COMPILER_GENERATED_FILES))
> +
> +LOCAL_GENERATED_SOURCES += $(MESA_GEN_GLSL_H)
> +
> +include $(MESA_COMMON_MK)
> +include $(BUILD_STATIC_LIBRARY)
> diff --git a/src/intel/Android.isl.mk b/src/intel/Android.isl.mk
> index 7e578af170..bc58b97df3 100644
> --- a/src/intel/Android.isl.mk
> +++ b/src/intel/Android.isl.mk
> @@ -25,8 +25,7 @@
> # ---------------------------------------
>
> LIBISL_GENX_COMMON_INCLUDES := \
> - $(MESA_TOP)/src/ \
> - $(MESA_TOP)/src/mesa/drivers/dri/i965
> + $(MESA_TOP)/src/
>
> # ---------------------------------------
> # Build libmesa_isl_gen4
> @@ -176,7 +175,7 @@ LOCAL_C_INCLUDES := \
> $(MESA_TOP)/src/gallium/auxiliary \
> $(MESA_TOP)/src/mapi \
> $(MESA_TOP)/src/mesa \
> - $(MESA_TOP)/src/mesa/drivers/dri/i965 \
> + $(MESA_TOP)/src/intel
>
> LOCAL_EXPORT_C_INCLUDE_DIRS := $(MESA_TOP)/src/intel
>
> diff --git a/src/intel/Android.mk b/src/intel/Android.mk
> index 147f5a7273..be2ba2fd9e 100644
> --- a/src/intel/Android.mk
> +++ b/src/intel/Android.mk
> @@ -27,6 +27,7 @@ include $(LOCAL_PATH)/Makefile.sources
>
> include $(LOCAL_PATH)/Android.blorp.mk
> include $(LOCAL_PATH)/Android.common.mk
> +include $(LOCAL_PATH)/Android.compiler.mk
> include $(LOCAL_PATH)/Android.genxml.mk
> include $(LOCAL_PATH)/Android.isl.mk
> include $(LOCAL_PATH)/vulkan/Android.mk
> diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
> index 9186b5cf1b..8d852a09c9 100644
> --- a/src/intel/Makefile.am
> +++ b/src/intel/Makefile.am
> @@ -26,12 +26,15 @@ AM_CPPFLAGS = \
> -I$(top_srcdir)/include \
> -I$(top_builddir)/src \
> -I$(top_srcdir)/src \
> + -I$(top_builddir)/src/compiler/glsl \
> + -I$(top_srcdir)/src/compiler/glsl \
> -I$(top_builddir)/src/compiler/nir \
> + -I$(top_srcdir)/src/compiler/nir \
> + -I$(top_srcdir)/src/gtest/include \
> -I$(top_builddir)/src/intel \
> -I$(top_srcdir)/src/intel \
> -I$(top_srcdir)/src/mapi \
> -I$(top_srcdir)/src/mesa \
> - -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
> -I$(top_srcdir)/src/gallium/auxiliary \
> -I$(top_srcdir)/src/gallium/include \
> $(INTEL_CFLAGS) \
> @@ -54,6 +57,7 @@ EXTRA_DIST =
>
> include Makefile.blorp.am
> include Makefile.common.am
> +include Makefile.compiler.am
> include Makefile.genxml.am
> include Makefile.isl.am
>
> diff --git a/src/intel/Makefile.compiler.am b/src/intel/Makefile.compiler.
> am
> new file mode 100644
> index 0000000000..b30c01a5bd
> --- /dev/null
> +++ b/src/intel/Makefile.compiler.am
> @@ -0,0 +1,121 @@
> +# Copyright 2015-2016 Intel Corporation
> +#
> +# Permission is hereby granted, free of charge, to any person obtaining a
> +# copy of this software and associated documentation files (the
> "Software"),
> +# to deal in the Software without restriction, including without
> limitation
> +# the rights to use, copy, modify, merge, publish, distribute, sublicense,
> +# and/or sell copies of the Software, and to permit persons to whom the
> +# Software is furnished to do so, subject to the following conditions:
> +#
> +# The above copyright notice and this permission notice (including the
> next
> +# paragraph) shall be included in all copies or substantial portions of
> the
> +# Software.
> +#
> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> OR
> +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> OTHER
> +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> DEALINGS
> +# IN THE SOFTWARE.
> +
> +noinst_LTLIBRARIES += compiler/libintel_compiler.la
> +
> +compiler_libintel_compiler_la_CPPFLAGS = \
> + -I$(top_builddir)/src/intel/compiler \
> + -I$(top_srcdir)/src/intel/compiler \
> + $(AM_CPPFLAGS)
> +
> +compiler_libintel_compiler_la_SOURCES = \
> + $(COMPILER_FILES) \
> + $(COMPILER_GENERATED_FILES)
> +
> +BUILT_SOURCES += $(COMPILER_GENERATED_FILES)
> +
> +compiler/brw_nir_trig_workarounds.c: compiler/brw_nir_trig_workarounds.py
> \
> + $(top_srcdir)/src/compiler/
> nir/nir_algebraic.py
> + $(MKDIR_GEN)
> + $(AM_V_GEN) PYTHONPATH=$(top_srcdir)/src/compiler/nir $(PYTHON2)
> $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py > $@ ||
> ($(RM) $@; false)
> +
> +EXTRA_DIST += \
> + compiler/brw_nir_trig_workarounds.py
> +
> +# ------------------------------------------------------------
> ----------------
> +# Tests
> +# ------------------------------------------------------------
> ----------------
> +
> +TEST_LIBS = \
> + compiler/libintel_compiler.la \
> + common/libintel_common.la \
> + $(top_builddir)/src/compiler/nir/libnir.la \
> + $(top_builddir)/src/util/libmesautil.la \
> + $(top_builddir)/src/intel/isl/libisl.la \
> + $(PTHREAD_LIBS) \
> + $(DLOPEN_LIBS)
> +
> +COMPILER_TESTS = \
> + compiler/test_fs_cmod_propagation \
> + compiler/test_fs_copy_propagation \
> + compiler/test_fs_saturate_propagation \
> + compiler/test_eu_compact \
> + compiler/test_eu_validate \
> + compiler/test_vf_float_conversions \
> + compiler/test_vec4_cmod_propagation \
> + compiler/test_vec4_copy_propagation \
> + compiler/test_vec4_register_coalesce
> +
> +TESTS += $(COMPILER_TESTS)
> +check_PROGRAMS += $(COMPILER_TESTS)
> +
> +compiler_test_fs_cmod_propagation_SOURCES = \
> + compiler/test_fs_cmod_propagation.cpp
> +compiler_test_fs_cmod_propagation_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_fs_copy_propagation_SOURCES = \
> + compiler/test_fs_copy_propagation.cpp
> +compiler_test_fs_copy_propagation_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_fs_saturate_propagation_SOURCES = \
> + compiler/test_fs_saturate_propagation.cpp
> +compiler_test_fs_saturate_propagation_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_vf_float_conversions_SOURCES = \
> + compiler/test_vf_float_conversions.cpp
> +compiler_test_vf_float_conversions_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_vec4_register_coalesce_SOURCES = \
> + compiler/test_vec4_register_coalesce.cpp
> +compiler_test_vec4_register_coalesce_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_vec4_copy_propagation_SOURCES = \
> + compiler/test_vec4_copy_propagation.cpp
> +compiler_test_vec4_copy_propagation_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_vec4_cmod_propagation_SOURCES = \
> + compiler/test_vec4_cmod_propagation.cpp
> +compiler_test_vec4_cmod_propagation_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> +
> +compiler_test_eu_compact_SOURCES = \
> + compiler/test_eu_compact.c
> +nodist_EXTRA_compiler_test_eu_compact_SOURCES = dummy.cpp
> +compiler_test_eu_compact_LDADD = $(TEST_LIBS)
> +
> +compiler_test_eu_validate_SOURCES = \
> + compiler/test_eu_validate.cpp
> +compiler_test_eu_validate_LDADD = \
> + $(top_builddir)/src/gtest/libgtest.la \
> + $(TEST_LIBS)
> diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
> index 240371261e..3e76cb8806 100644
> --- a/src/intel/Makefile.sources
> +++ b/src/intel/Makefile.sources
> @@ -16,6 +16,96 @@ COMMON_FILES = \
> common/gen_urb_config.c \
> common/gen_sample_positions.h
>
> +COMPILER_FILES = \
> + compiler/brw_cfg.cpp \
> + compiler/brw_cfg.h \
> + compiler/brw_compiler.c \
> + compiler/brw_compiler.h \
> + compiler/brw_dead_control_flow.cpp \
> + compiler/brw_dead_control_flow.h \
> + compiler/brw_defines.h \
>
This one should probably go. :-)
> + compiler/brw_disasm.c \
> + compiler/brw_eu.c \
> + compiler/brw_eu_compact.c \
> + compiler/brw_eu_defines.h \
> + compiler/brw_eu_emit.c \
> + compiler/brw_eu.h \
> + compiler/brw_eu_util.c \
> + compiler/brw_eu_validate.c \
> + compiler/brw_fs_builder.h \
> + compiler/brw_fs_cmod_propagation.cpp \
> + compiler/brw_fs_combine_constants.cpp \
> + compiler/brw_fs_copy_propagation.cpp \
> + compiler/brw_fs.cpp \
> + compiler/brw_fs_cse.cpp \
> + compiler/brw_fs_dead_code_eliminate.cpp \
> + compiler/brw_fs_generator.cpp \
> + compiler/brw_fs.h \
> + compiler/brw_fs_live_variables.cpp \
> + compiler/brw_fs_live_variables.h \
> + compiler/brw_fs_lower_d2x.cpp \
> + compiler/brw_fs_lower_pack.cpp \
> + compiler/brw_fs_nir.cpp \
> + compiler/brw_fs_reg_allocate.cpp \
> + compiler/brw_fs_register_coalesce.cpp \
> + compiler/brw_fs_saturate_propagation.cpp \
> + compiler/brw_fs_sel_peephole.cpp \
> + compiler/brw_fs_surface_builder.cpp \
> + compiler/brw_fs_surface_builder.h \
> + compiler/brw_fs_validate.cpp \
> + compiler/brw_fs_visitor.cpp \
> + compiler/brw_inst.h \
> + compiler/brw_interpolation_map.c \
> + compiler/brw_ir_allocator.h \
> + compiler/brw_ir_fs.h \
> + compiler/brw_ir_vec4.h \
> + compiler/brw_nir.h \
> + compiler/brw_nir.c \
> + compiler/brw_nir_analyze_boolean_resolves.c \
> + compiler/brw_nir_attribute_workarounds.c \
> + compiler/brw_nir_intrinsics.c \
> + compiler/brw_nir_opt_peephole_ffma.c \
> + compiler/brw_nir_tcs_workarounds.c \
> + compiler/brw_packed_float.c \
> + compiler/brw_predicated_break.cpp \
> + compiler/brw_reg.h \
> + compiler/brw_schedule_instructions.cpp \
> + compiler/brw_shader.cpp \
> + compiler/brw_shader.h \
> + compiler/brw_vec4_builder.h \
> + compiler/brw_vec4_cmod_propagation.cpp \
> + compiler/brw_vec4_copy_propagation.cpp \
> + compiler/brw_vec4.cpp \
> + compiler/brw_vec4_cse.cpp \
> + compiler/brw_vec4_dead_code_eliminate.cpp \
> + compiler/brw_vec4_generator.cpp \
> + compiler/brw_vec4_gs_visitor.cpp \
> + compiler/brw_vec4_gs_visitor.h \
> + compiler/brw_vec4.h \
> + compiler/brw_vec4_live_variables.cpp \
> + compiler/brw_vec4_live_variables.h \
> + compiler/brw_vec4_nir.cpp \
> + compiler/brw_vec4_gs_nir.cpp \
> + compiler/brw_vec4_reg_allocate.cpp \
> + compiler/brw_vec4_surface_builder.cpp \
> + compiler/brw_vec4_surface_builder.h \
> + compiler/brw_vec4_tcs.cpp \
> + compiler/brw_vec4_tcs.h \
> + compiler/brw_vec4_tes.cpp \
> + compiler/brw_vec4_tes.h \
> + compiler/brw_vec4_visitor.cpp \
> + compiler/brw_vec4_vs_visitor.cpp \
> + compiler/brw_vec4_vs.h \
> + compiler/brw_vue_map.c \
> + compiler/brw_wm_iz.cpp \
> + compiler/gen6_gs_visitor.cpp \
> + compiler/gen6_gs_visitor.h \
> + compiler/intel_asm_annotation.c \
> + compiler/intel_asm_annotation.h
> +
> +COMPILER_GENERATED_FILES = \
> + compiler/brw_nir_trig_workarounds.c
> +
> GENXML_GENERATED_FILES = \
> genxml/gen4_pack.h \
> genxml/gen45_pack.h \
>
[snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170309/b6e08c16/attachment-0001.html>
More information about the mesa-dev
mailing list