diff options
author | Rob Clark <[email protected]> | 2018-11-10 12:05:59 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-11-27 15:44:02 -0500 |
commit | aa0fed10d3574aec8c129bace78018ae060484c0 (patch) | |
tree | 2fee64028d47f6112f881903848a126da35eb5ea | |
parent | 556eec249d6d81be88389784ce5f2583712d85d5 (diff) |
freedreno: move ir3 to common location
Move (most of) the ir3 compiler to src/freedreno/ir3 so that it can be
re-used by some future vulkan driver. The parts that are gallium
specific have been refactored out and remain in the gallium driver.
Getting the move done now so that it can happen before further
refactoring to support a6xx specific instructions.
NOTE also removes ir3_cmdline compiler tool from autotools build since
that was easier than fixing it and I normally use meson build. Waiting
patiently for the day that we can remove *everything* from the autotools
build.
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/freedreno/Makefile.am | 19 | ||||
-rw-r--r-- | src/freedreno/Makefile.sources | 24 | ||||
-rw-r--r-- | src/freedreno/ir3/disasm-a3xx.c (renamed from src/gallium/drivers/freedreno/ir3/disasm-a3xx.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/instr-a3xx.h (renamed from src/gallium/drivers/freedreno/ir3/instr-a3xx.h) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3.c (renamed from src/gallium/drivers/freedreno/ir3/ir3.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3.h (renamed from src/gallium/drivers/freedreno/ir3/ir3.h) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_compiler.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_compiler.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_compiler.h (renamed from src/gallium/drivers/freedreno/ir3/ir3_compiler.h) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_cp.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_cp.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_depth.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_depth.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_group.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_group.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_legalize.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_legalize.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_nir.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_nir.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_nir.h (renamed from src/gallium/drivers/freedreno/ir3/ir3_nir.h) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_nir_trig.py (renamed from src/gallium/drivers/freedreno/ir3/ir3_nir_trig.py) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_print.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_print.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_ra.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_ra.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_sched.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_sched.c) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_shader.c (renamed from src/gallium/drivers/freedreno/ir3/ir3_shader.c) | 2 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_shader.h (renamed from src/gallium/drivers/freedreno/ir3/ir3_shader.h) | 0 | ||||
-rw-r--r-- | src/freedreno/ir3/meson.build | 64 | ||||
-rw-r--r-- | src/freedreno/meson.build | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/Automake.inc | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/Makefile.am | 31 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/Makefile.sources | 23 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_program.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_program.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_program.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cache.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_gallium.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/meson.build | 38 |
44 files changed, 145 insertions, 110 deletions
diff --git a/src/freedreno/Makefile.am b/src/freedreno/Makefile.am index 9ddc3c0ad35..8f027e34f8a 100644 --- a/src/freedreno/Makefile.am +++ b/src/freedreno/Makefile.am @@ -45,7 +45,8 @@ TESTS = BUILT_SOURCES = CLEANFILES = EXTRA_DIST = \ - drm/meson.build + drm/meson.build \ + ir3/meson.build MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS) @@ -57,3 +58,19 @@ noinst_LTLIBRARIES += libfreedreno_drm.la libfreedreno_drm_la_SOURCES = $(drm_SOURCES) libfreedreno_drm_la_CFLAGS = $(VALGRIND_CFLAGS) $(LIBDRM_CFLAGS) +noinst_LTLIBRARIES += libfreedreno_ir3.la + +libfreedreno_ir3_la_SOURCES = $(ir3_SOURCES) $(ir3_GENERATED_FILES) +libfreedreno_ir3_la_CFLAGS = \ + -I$(top_srcdir)/src/freedreno/ir3 \ + -I$(top_builddir)/src/compiler/nir \ + -I$(top_srcdir)/src/compiler/nir +libfreedreno_ir3_LIBADD = \ + $(top_builddir)/src/compiler/nir/libnir.la \ + $(top_builddir)/src/util/libmesautil.la + +MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) +ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py + $(MKDIR_GEN) + $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false) + diff --git a/src/freedreno/Makefile.sources b/src/freedreno/Makefile.sources index 06a1a99b9e2..1df5e6250b5 100644 --- a/src/freedreno/Makefile.sources +++ b/src/freedreno/Makefile.sources @@ -15,3 +15,27 @@ drm_SOURCES := \ drm/msm_drm.h \ drm/msm_ringbuffer.c +ir3_SOURCES := \ + ir3/disasm-a3xx.c \ + ir3/instr-a3xx.h \ + ir3/ir3.c \ + ir3/ir3_compiler.c \ + ir3/ir3_compiler.h \ + ir3/ir3_compiler_nir.c \ + ir3/ir3_cp.c \ + ir3/ir3_depth.c \ + ir3/ir3_group.c \ + ir3/ir3.h \ + ir3/ir3_legalize.c \ + ir3/ir3_nir.c \ + ir3/ir3_nir.h \ + ir3/ir3_nir_lower_tg4_to_tex.c \ + ir3/ir3_print.c \ + ir3/ir3_ra.c \ + ir3/ir3_sched.c \ + ir3/ir3_shader.c \ + ir3/ir3_shader.h + +ir3_GENERATED_FILES := \ + ir3/ir3_nir_trig.c + diff --git a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c index 4cf45ce9227..4cf45ce9227 100644 --- a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c +++ b/src/freedreno/ir3/disasm-a3xx.c diff --git a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h b/src/freedreno/ir3/instr-a3xx.h index 7f60ee5fd4c..7f60ee5fd4c 100644 --- a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h +++ b/src/freedreno/ir3/instr-a3xx.h diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index 3d1c4449b12..3d1c4449b12 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index ea3218828df..ea3218828df 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/freedreno/ir3/ir3_compiler.c index f00daebabf5..f00daebabf5 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c +++ b/src/freedreno/ir3/ir3_compiler.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.h b/src/freedreno/ir3/ir3_compiler.h index e2336062b29..e2336062b29 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.h +++ b/src/freedreno/ir3/ir3_compiler.h diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 445a2b291e9..445a2b291e9 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c index e8e8cc311e3..e8e8cc311e3 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cp.c +++ b/src/freedreno/ir3/ir3_cp.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_depth.c b/src/freedreno/ir3/ir3_depth.c index 73bf5e19926..73bf5e19926 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_depth.c +++ b/src/freedreno/ir3/ir3_depth.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_group.c b/src/freedreno/ir3/ir3_group.c index 570055973e8..570055973e8 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_group.c +++ b/src/freedreno/ir3/ir3_group.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c index ff4c644eab5..ff4c644eab5 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_legalize.c +++ b/src/freedreno/ir3/ir3_legalize.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 70c01ee0593..70c01ee0593 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.h b/src/freedreno/ir3/ir3_nir.h index 74201d34160..74201d34160 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.h +++ b/src/freedreno/ir3/ir3_nir.h diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c b/src/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c index 37a3dcb26f8..37a3dcb26f8 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c +++ b/src/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir_trig.py b/src/freedreno/ir3/ir3_nir_trig.py index 3968aea543c..3968aea543c 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir_trig.py +++ b/src/freedreno/ir3/ir3_nir_trig.py diff --git a/src/gallium/drivers/freedreno/ir3/ir3_print.c b/src/freedreno/ir3/ir3_print.c index b6ef6e4b5a7..b6ef6e4b5a7 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_print.c +++ b/src/freedreno/ir3/ir3_print.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index ad09c4018d3..ad09c4018d3 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c index 6552980d90c..6552980d90c 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_sched.c +++ b/src/freedreno/ir3/ir3_sched.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index b58a204c6b9..8b18e950cca 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -28,7 +28,7 @@ #include "util/u_memory.h" #include "util/u_format.h" -#include "freedreno_util.h" +#include "drm/freedreno_drmif.h" #include "ir3_shader.h" #include "ir3_compiler.h" diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index bc47160d6ea..bc47160d6ea 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h diff --git a/src/freedreno/ir3/meson.build b/src/freedreno/ir3/meson.build new file mode 100644 index 00000000000..07319dff595 --- /dev/null +++ b/src/freedreno/ir3/meson.build @@ -0,0 +1,64 @@ +# Copyright © 2018 Rob Clark + +# 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 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. + +ir3_nir_trig_c = custom_target( + 'ir3_nir_trig.c', + input : 'ir3_nir_trig.py', + output : 'ir3_nir_trig.c', + command : [ + prog_python, '@INPUT@', + '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), + ], + capture : true, + depend_files : nir_algebraic_py, +) + +libfreedreno_ir3_files = files( + 'disasm-a3xx.c', + 'instr-a3xx.h', + 'ir3.c', + 'ir3_compiler_nir.c', + 'ir3_compiler.c', + 'ir3_compiler.h', + 'ir3_cp.c', + 'ir3_depth.c', + 'ir3_group.c', + 'ir3.h', + 'ir3_legalize.c', + 'ir3_nir.c', + 'ir3_nir.h', + 'ir3_nir_lower_tg4_to_tex.c', + 'ir3_print.c', + 'ir3_ra.c', + 'ir3_sched.c', + 'ir3_shader.c', + 'ir3_shader.h', +) + +libfreedreno_ir3 = static_library( + 'freedreno_ir3', + [libfreedreno_ir3_files, ir3_nir_trig_c], + include_directories : [inc_freedreno, inc_common], + c_args : [c_vis_args, no_override_init_args], + cpp_args : [cpp_vis_args], + dependencies : idep_nir_headers, + build_by_default : false, +) + diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build index bb2cb201c0d..26ee6213890 100644 --- a/src/freedreno/meson.build +++ b/src/freedreno/meson.build @@ -21,3 +21,4 @@ inc_freedreno = include_directories('.') subdir('drm') +subdir('ir3') diff --git a/src/gallium/drivers/freedreno/Automake.inc b/src/gallium/drivers/freedreno/Automake.inc index 9b9b3d39fea..936c286f4c9 100644 --- a/src/gallium/drivers/freedreno/Automake.inc +++ b/src/gallium/drivers/freedreno/Automake.inc @@ -6,6 +6,7 @@ TARGET_LIB_DEPS += \ $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \ $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \ $(top_builddir)/src/freedreno/libfreedreno_drm.la \ + $(top_builddir)/src/freedreno/libfreedreno_ir3.la \ $(FREEDRENO_LIBS) \ $(LIBDRM_LIBS) diff --git a/src/gallium/drivers/freedreno/Makefile.am b/src/gallium/drivers/freedreno/Makefile.am index 39887e13e37..32130ab94c5 100644 --- a/src/gallium/drivers/freedreno/Makefile.am +++ b/src/gallium/drivers/freedreno/Makefile.am @@ -9,11 +9,6 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/compiler/nir \ $(GALLIUM_DRIVER_CFLAGS) -MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) -ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py - $(MKDIR_GEN) - $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false) - noinst_LTLIBRARIES = libfreedreno.la libfreedreno_la_SOURCES = \ @@ -23,28 +18,6 @@ libfreedreno_la_SOURCES = \ $(a4xx_SOURCES) \ $(a5xx_SOURCES) \ $(a6xx_SOURCES) \ - $(ir3_SOURCES) \ - $(ir3_GENERATED_FILES) - -BUILT_SOURCES := $(ir3_GENERATED_FILES) -CLEANFILES := $(BUILT_SOURCES) -EXTRA_DIST = ir3/ir3_nir_trig.py - -noinst_PROGRAMS = ir3_compiler - -# XXX: Required due to the C++ sources in libnir -nodist_EXTRA_ir3_compiler_SOURCES = dummy.cpp -ir3_compiler_SOURCES = \ - ir3/ir3_cmdline.c - -ir3_compiler_LDADD = \ - libfreedreno.la \ - $(top_builddir)/src/gallium/auxiliary/libgallium.la \ - $(top_builddir)/src/compiler/nir/libnir.la \ - $(top_builddir)/src/compiler/glsl/libstandalone.la \ - $(top_builddir)/src/util/libmesautil.la \ - $(top_builddir)/src/mesa/libmesagallium.la \ - $(top_builddir)/src/freedreno/libfreedreno_drm.la \ - $(GALLIUM_COMMON_LIB_DEPS) + $(ir3_SOURCES) -EXTRA_DIST += meson.build +EXTRA_DIST = meson.build diff --git a/src/gallium/drivers/freedreno/Makefile.sources b/src/gallium/drivers/freedreno/Makefile.sources index bde217d80a2..039a8ca7af7 100644 --- a/src/gallium/drivers/freedreno/Makefile.sources +++ b/src/gallium/drivers/freedreno/Makefile.sources @@ -195,29 +195,8 @@ a6xx_SOURCES := \ a6xx/fd6_zsa.h ir3_SOURCES := \ - ir3/disasm-a3xx.c \ - ir3/instr-a3xx.h \ - ir3/ir3.c \ ir3/ir3_cache.c \ ir3/ir3_cache.h \ - ir3/ir3_compiler_nir.c \ - ir3/ir3_compiler.c \ - ir3/ir3_compiler.h \ - ir3/ir3_cp.c \ - ir3/ir3_depth.c \ ir3/ir3_gallium.c \ - ir3/ir3_gallium.h \ - ir3/ir3_group.c \ - ir3/ir3.h \ - ir3/ir3_legalize.c \ - ir3/ir3_nir.c \ - ir3/ir3_nir.h \ - ir3/ir3_nir_lower_tg4_to_tex.c \ - ir3/ir3_print.c \ - ir3/ir3_ra.c \ - ir3/ir3_sched.c \ - ir3/ir3_shader.c \ - ir3/ir3_shader.h + ir3/ir3_gallium.h -ir3_GENERATED_FILES := \ - ir3/ir3_nir_trig.c diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_context.h b/src/gallium/drivers/freedreno/a3xx/fd3_context.h index 4596aeee025..0c9412a7501 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_context.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_context.h @@ -31,7 +31,7 @@ #include "freedreno_context.h" -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" struct fd3_context { diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.h b/src/gallium/drivers/freedreno/a3xx/fd3_program.h index 0551f1f8b91..533838a9a6d 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.h @@ -29,7 +29,8 @@ #include "pipe/p_context.h" #include "freedreno_context.h" -#include "ir3_shader.h" + +#include "ir3/ir3_shader.h" struct fd3_emit; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c index a010a4df9a1..7ed57d2de5a 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c @@ -30,7 +30,8 @@ #include "fd3_screen.h" #include "fd3_context.h" #include "fd3_format.h" -#include "ir3_compiler.h" + +#include "ir3/ir3_compiler.h" static boolean fd3_screen_is_format_supported(struct pipe_screen *pscreen, diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_context.h b/src/gallium/drivers/freedreno/a4xx/fd4_context.h index a4b84d400ef..a84e3a90f83 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_context.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_context.h @@ -31,7 +31,7 @@ #include "freedreno_context.h" -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" struct fd4_context { struct fd_context base; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.h b/src/gallium/drivers/freedreno/a4xx/fd4_program.h index cc98bc9a4d6..a0a0bec264f 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_program.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.h @@ -29,7 +29,8 @@ #include "pipe/p_context.h" #include "freedreno_context.h" -#include "ir3_shader.h" + +#include "ir3/ir3_shader.h" struct fd4_emit; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c index 4e4e274cd10..961e907b779 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c @@ -30,7 +30,8 @@ #include "fd4_screen.h" #include "fd4_context.h" #include "fd4_format.h" -#include "ir3_compiler.h" + +#include "ir3/ir3_compiler.h" static boolean fd4_screen_is_format_supported(struct pipe_screen *pscreen, diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_context.h b/src/gallium/drivers/freedreno/a5xx/fd5_context.h index 0cd252167b7..324878b4348 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_context.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_context.h @@ -31,7 +31,7 @@ #include "freedreno_context.h" -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" struct fd5_context { struct fd_context base; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_program.h b/src/gallium/drivers/freedreno/a5xx/fd5_program.h index 72cbf9a8b88..cdb31c62b63 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_program.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_program.h @@ -29,7 +29,8 @@ #include "pipe/p_context.h" #include "freedreno_context.h" -#include "ir3_shader.h" + +#include "ir3/ir3_shader.h" struct fd5_emit; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c index 7d8d2b3e5b8..db961790879 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c @@ -33,7 +33,7 @@ #include "fd5_format.h" #include "fd5_resource.h" -#include "ir3_compiler.h" +#include "ir3/ir3_compiler.h" static bool valid_sample_count(unsigned sample_count) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.h b/src/gallium/drivers/freedreno/a6xx/fd6_context.h index f3cdd44dec4..2493813fe1a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_context.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.h @@ -32,7 +32,7 @@ #include "freedreno_context.h" -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" #include "a6xx.xml.h" diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.h b/src/gallium/drivers/freedreno/a6xx/fd6_program.h index 83c4688a243..3ed5426b50e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.h @@ -30,7 +30,8 @@ #include "pipe/p_context.h" #include "freedreno_context.h" -#include "ir3_shader.h" + +#include "ir3/ir3_shader.h" #include "ir3_cache.h" struct fd6_streamout_state { diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c index 9e039bf87a9..a191ea696ba 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c @@ -33,7 +33,7 @@ #include "fd6_format.h" #include "fd6_resource.h" -#include "ir3_compiler.h" +#include "ir3/ir3_compiler.h" static boolean fd6_screen_is_format_supported(struct pipe_screen *pscreen, diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cache.h b/src/gallium/drivers/freedreno/ir3/ir3_cache.h index 3d3a7f8050d..73d555e92ce 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cache.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_cache.h @@ -27,7 +27,7 @@ #ifndef IR3_CACHE_H_ #define IR3_CACHE_H_ -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" /* * An in-memory cache for mapping shader state objects plus shader key to diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index d12cdd353ab..47fd5dfd012 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -37,11 +37,11 @@ #include "tgsi/tgsi_text.h" #include "tgsi/tgsi_dump.h" -#include "ir3_compiler.h" -#include "ir3_gallium.h" -#include "ir3_nir.h" -#include "instr-a3xx.h" -#include "ir3.h" +#include "ir3/ir3_compiler.h" +#include "ir3/ir3_gallium.h" +#include "ir3/ir3_nir.h" +#include "ir3/instr-a3xx.h" +#include "ir3/ir3.h" #include "compiler/glsl/standalone.h" #include "compiler/glsl/glsl_to_nir.h" diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index 3a1b857e010..cc6efa1ca17 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -37,10 +37,10 @@ #include "freedreno_context.h" #include "freedreno_util.h" -#include "ir3_shader.h" -#include "ir3_gallium.h" -#include "ir3_compiler.h" -#include "ir3_nir.h" +#include "ir3/ir3_shader.h" +#include "ir3/ir3_gallium.h" +#include "ir3/ir3_compiler.h" +#include "ir3/ir3_nir.h" static void dump_shader_info(struct ir3_shader_variant *v, struct pipe_debug_callback *debug) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.h b/src/gallium/drivers/freedreno/ir3/ir3_gallium.h index cf1d48d97ba..5fb74596781 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.h @@ -28,7 +28,7 @@ #define IR3_GALLIUM_H_ #include "pipe/p_state.h" -#include "ir3_shader.h" +#include "ir3/ir3_shader.h" struct ir3_shader * ir3_shader_create(struct ir3_compiler *compiler, const struct pipe_shader_state *cso, gl_shader_stage type, diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build index 797ba081758..f996126e386 100644 --- a/src/gallium/drivers/freedreno/meson.build +++ b/src/gallium/drivers/freedreno/meson.build @@ -18,18 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -ir3_nir_trig_c = custom_target( - 'ir3_nir_trig.c', - input : 'ir3/ir3_nir_trig.py', - output : 'ir3_nir_trig.c', - command : [ - prog_python, '@INPUT@', - '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), - ], - capture : true, - depend_files : nir_algebraic_py, -) - files_libfreedreno = files( 'adreno_common.xml.h', 'adreno_pm4.xml.h', @@ -215,35 +203,15 @@ files_libfreedreno = files( 'a6xx/fd6_texture.h', 'a6xx/fd6_zsa.c', 'a6xx/fd6_zsa.h', - 'ir3/disasm-a3xx.c', - 'ir3/instr-a3xx.h', - 'ir3/ir3.c', 'ir3/ir3_cache.c', 'ir3/ir3_cache.h', - 'ir3/ir3_compiler_nir.c', - 'ir3/ir3_compiler.c', - 'ir3/ir3_compiler.h', - 'ir3/ir3_cp.c', - 'ir3/ir3_depth.c', 'ir3/ir3_gallium.c', 'ir3/ir3_gallium.h', - 'ir3/ir3_group.c', - 'ir3/ir3.h', - 'ir3/ir3_legalize.c', - 'ir3/ir3_nir.c', - 'ir3/ir3_nir.h', - 'ir3/ir3_nir_lower_tg4_to_tex.c', - 'ir3/ir3_print.c', - 'ir3/ir3_ra.c', - 'ir3/ir3_sched.c', - 'ir3/ir3_shader.c', - 'ir3/ir3_shader.h', ) freedreno_includes = [ inc_src, inc_include, inc_gallium, inc_gallium_aux, - inc_freedreno, - include_directories('ir3') + inc_freedreno, include_directories('ir3'), ] freedreno_c_args = [] @@ -258,7 +226,7 @@ endif libfreedreno = static_library( 'freedreno', - [files_libfreedreno, ir3_nir_trig_c], + [files_libfreedreno], include_directories : freedreno_includes, c_args : [freedreno_c_args, c_vis_args], cpp_args : [freedreno_cpp_args, cpp_vis_args], @@ -273,6 +241,7 @@ driver_freedreno = declare_dependency( libfreedrenowinsys, libfreedreno, libfreedreno_drm, + libfreedreno_ir3, ], dependencies : idep_nir, ) @@ -288,6 +257,7 @@ ir3_compiler = executable( link_with : [ libfreedreno, libfreedreno_drm, + libfreedreno_ir3, libgallium, libglsl_standalone, libmesa_util, |