summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/Android.common.mk6
-rw-r--r--src/amd/Makefile.sources35
-rw-r--r--src/amd/common/meson.build12
-rw-r--r--src/amd/compiler/meson.build2
-rw-r--r--src/amd/llvm/ac_llvm_build.c (renamed from src/amd/common/ac_llvm_build.c)0
-rw-r--r--src/amd/llvm/ac_llvm_build.h (renamed from src/amd/common/ac_llvm_build.h)0
-rw-r--r--src/amd/llvm/ac_llvm_cull.c (renamed from src/amd/common/ac_llvm_cull.c)0
-rw-r--r--src/amd/llvm/ac_llvm_cull.h (renamed from src/amd/common/ac_llvm_cull.h)0
-rw-r--r--src/amd/llvm/ac_llvm_helper.cpp (renamed from src/amd/common/ac_llvm_helper.cpp)0
-rw-r--r--src/amd/llvm/ac_llvm_util.c (renamed from src/amd/common/ac_llvm_util.c)0
-rw-r--r--src/amd/llvm/ac_llvm_util.h (renamed from src/amd/common/ac_llvm_util.h)0
-rw-r--r--src/amd/llvm/ac_nir_to_llvm.c (renamed from src/amd/common/ac_nir_to_llvm.c)0
-rw-r--r--src/amd/llvm/ac_nir_to_llvm.h (renamed from src/amd/common/ac_nir_to_llvm.h)0
-rw-r--r--src/amd/llvm/ac_shader_abi.h (renamed from src/amd/common/ac_shader_abi.h)0
-rw-r--r--src/amd/llvm/meson.build50
-rw-r--r--src/amd/meson.build1
-rw-r--r--src/amd/vulkan/meson.build4
17 files changed, 74 insertions, 36 deletions
diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index d5a266215f0..f77aa79c7d8 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -30,9 +30,8 @@ LOCAL_MODULE := libmesa_amd_common
LOCAL_SRC_FILES := \
$(AMD_COMMON_FILES) \
- $(AMD_COMPILER_FILES) \
- $(AMD_DEBUG_FILES) \
- $(AMD_NIR_FILES)
+ $(AMD_COMMON_LLVM_FILES) \
+ $(AMD_DEBUG_FILES)
LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU # instructs LLVM to declare LLVMInitializeAMDGPU* functions
@@ -72,6 +71,7 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/include \
$(MESA_TOP)/src \
$(MESA_TOP)/src/amd/common \
+ $(MESA_TOP)/src/amd/llvm \
$(MESA_TOP)/src/compiler \
$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \
$(MESA_TOP)/src/gallium/include \
diff --git a/src/amd/Makefile.sources b/src/amd/Makefile.sources
index 22f71bf1758..245ce1042ee 100644
--- a/src/amd/Makefile.sources
+++ b/src/amd/Makefile.sources
@@ -36,33 +36,30 @@ ADDRLIB_FILES = \
addrlib/src/r800/siaddrlib.cpp \
addrlib/src/r800/siaddrlib.h
-AMD_COMPILER_FILES = \
+AMD_COMMON_FILES = \
common/ac_binary.c \
common/ac_binary.h \
common/ac_exp_param.h \
- common/ac_llvm_build.c \
- common/ac_llvm_build.h \
- common/ac_llvm_cull.c \
- common/ac_llvm_cull.h \
- common/ac_llvm_helper.cpp \
- common/ac_llvm_util.c \
- common/ac_llvm_util.h \
+ common/ac_gpu_info.c \
+ common/ac_gpu_info.h \
+ common/ac_surface.c \
+ common/ac_surface.h \
common/ac_rtld.c \
common/ac_rtld.h \
- common/ac_shader_abi.h \
common/ac_shader_util.c \
common/ac_shader_util.h
-
-AMD_NIR_FILES = \
- common/ac_nir_to_llvm.c \
- common/ac_nir_to_llvm.h
-
-AMD_COMMON_FILES = \
- common/ac_gpu_info.c \
- common/ac_gpu_info.h \
- common/ac_surface.c \
- common/ac_surface.h
+AMD_COMMON_LLVM_FILES = \
+ llvm/ac_llvm_build.c \
+ llvm/ac_llvm_build.h \
+ llvm/ac_llvm_cull.c \
+ llvm/ac_llvm_cull.h \
+ llvm/ac_llvm_helper.cpp \
+ llvm/ac_llvm_util.c \
+ llvm/ac_llvm_util.h \
+ llvm/ac_shader_abi.h \
+ llvm/ac_nir_to_llvm.c \
+ llvm/ac_nir_to_llvm.h
AMD_DEBUG_FILES = \
common/ac_debug.c \
diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index d5d70ad66db..d752bfce83f 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -40,18 +40,8 @@ amd_common_files = files(
'ac_binary.c',
'ac_binary.h',
'ac_exp_param.h',
- 'ac_llvm_build.c',
- 'ac_llvm_build.h',
- 'ac_llvm_cull.c',
- 'ac_llvm_cull.h',
- 'ac_llvm_helper.cpp',
- 'ac_llvm_util.c',
- 'ac_llvm_util.h',
- 'ac_shader_abi.h',
'ac_shader_util.c',
'ac_shader_util.h',
- 'ac_nir_to_llvm.c',
- 'ac_nir_to_llvm.h',
'ac_gpu_info.c',
'ac_gpu_info.h',
'ac_rtld.c',
@@ -69,7 +59,7 @@ libamd_common = static_library(
inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd,
],
dependencies : [
- dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+ dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
idep_nir_headers,
],
c_args : [c_vis_args],
diff --git a/src/amd/compiler/meson.build b/src/amd/compiler/meson.build
index 73151cad6eb..f4c8b57fc94 100644
--- a/src/amd/compiler/meson.build
+++ b/src/amd/compiler/meson.build
@@ -85,7 +85,7 @@ _libaco = static_library(
'aco',
[libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h],
include_directories : [
- inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common,
+ inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common, inc_amd_common_llvm,
],
dependencies : [
dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index cda2daab6f5..cda2daab6f5 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/llvm/ac_llvm_build.h
index 013bf00041a..013bf00041a 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/llvm/ac_llvm_build.h
diff --git a/src/amd/common/ac_llvm_cull.c b/src/amd/llvm/ac_llvm_cull.c
index 1c2da3e0418..1c2da3e0418 100644
--- a/src/amd/common/ac_llvm_cull.c
+++ b/src/amd/llvm/ac_llvm_cull.c
diff --git a/src/amd/common/ac_llvm_cull.h b/src/amd/llvm/ac_llvm_cull.h
index 0aa6c902a68..0aa6c902a68 100644
--- a/src/amd/common/ac_llvm_cull.h
+++ b/src/amd/llvm/ac_llvm_cull.h
diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp
index b7a72ee3fdd..b7a72ee3fdd 100644
--- a/src/amd/common/ac_llvm_helper.cpp
+++ b/src/amd/llvm/ac_llvm_helper.cpp
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/llvm/ac_llvm_util.c
index ddc8fee839b..ddc8fee839b 100644
--- a/src/amd/common/ac_llvm_util.c
+++ b/src/amd/llvm/ac_llvm_util.c
diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/llvm/ac_llvm_util.h
index 60c9a17e447..60c9a17e447 100644
--- a/src/amd/common/ac_llvm_util.h
+++ b/src/amd/llvm/ac_llvm_util.h
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c
index bb99c736f78..bb99c736f78 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/llvm/ac_nir_to_llvm.c
diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/llvm/ac_nir_to_llvm.h
index 4782d9fc9d6..4782d9fc9d6 100644
--- a/src/amd/common/ac_nir_to_llvm.h
+++ b/src/amd/llvm/ac_nir_to_llvm.h
diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/llvm/ac_shader_abi.h
index 61f1b735c49..61f1b735c49 100644
--- a/src/amd/common/ac_shader_abi.h
+++ b/src/amd/llvm/ac_shader_abi.h
diff --git a/src/amd/llvm/meson.build b/src/amd/llvm/meson.build
new file mode 100644
index 00000000000..f9868cfac09
--- /dev/null
+++ b/src/amd/llvm/meson.build
@@ -0,0 +1,50 @@
+# Copyright © 2019 Valve 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 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.
+
+amd_common_llvm_files = files(
+ 'ac_llvm_build.c',
+ 'ac_llvm_build.h',
+ 'ac_llvm_cull.c',
+ 'ac_llvm_cull.h',
+ 'ac_llvm_helper.cpp',
+ 'ac_llvm_util.c',
+ 'ac_llvm_util.h',
+ 'ac_nir_to_llvm.c',
+ 'ac_nir_to_llvm.h',
+ 'ac_shader_abi.h',
+)
+
+libamd_common_llvm = static_library(
+ 'amd_common_llvm',
+ [amd_common_llvm_files],
+ include_directories : [
+ inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common
+ ],
+ link_with: [
+ libamd_common
+ ],
+ dependencies : [
+ dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+ idep_nir_headers, idep_amdgfxregs_h,
+ ],
+ c_args : [c_vis_args],
+ cpp_args : [cpp_vis_args],
+)
+
diff --git a/src/amd/meson.build b/src/amd/meson.build
index 085abecd2a9..10b04c00333 100644
--- a/src/amd/meson.build
+++ b/src/amd/meson.build
@@ -22,6 +22,7 @@ inc_amd = include_directories('.')
subdir('addrlib')
subdir('common')
+subdir('llvm')
if with_amd_vk
subdir('compiler')
subdir('vulkan')
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 72cb64c5847..afc5bde56c7 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -149,10 +149,10 @@ libvulkan_radeon = shared_library(
'vulkan_radeon',
[libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h, xmlpool_options_h, radv_gfx10_format_table_h],
include_directories : [
- inc_common, inc_amd, inc_amd_common, inc_compiler, inc_util, inc_vulkan_wsi,
+ inc_common, inc_amd, inc_amd_common, inc_amd_common_llvm, inc_compiler, inc_util, inc_vulkan_wsi,
],
link_with : [
- libamd_common, libamdgpu_addrlib, libvulkan_wsi,
+ libamd_common, libamd_common_llvm, libamdgpu_addrlib, libvulkan_wsi,
],
dependencies : [
dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,