summaryrefslogtreecommitdiff
path: root/lib/mesa/src/amd
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:10 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:10 +0000
commit2ebab484cac65c01dd19e8c1b62eb58c83074390 (patch)
treed5decbcdfb7743214078cb8e0b0372a59c2ca6d6 /lib/mesa/src/amd
parentc5f75a531a75824f9087ebabbb1d9ff34a17d110 (diff)
Import Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/amd')
-rw-r--r--lib/mesa/src/amd/Android.addrlib.mk2
-rw-r--r--lib/mesa/src/amd/Android.common.mk48
-rw-r--r--lib/mesa/src/amd/Android.mk1
-rw-r--r--lib/mesa/src/amd/vulkan/Android.mk52
4 files changed, 53 insertions, 50 deletions
diff --git a/lib/mesa/src/amd/Android.addrlib.mk b/lib/mesa/src/amd/Android.addrlib.mk
index 4e13ae1fd..eec78fc8b 100644
--- a/lib/mesa/src/amd/Android.addrlib.mk
+++ b/lib/mesa/src/amd/Android.addrlib.mk
@@ -30,8 +30,6 @@ LOCAL_MODULE := libmesa_amdgpu_addrlib
LOCAL_SRC_FILES := $(ADDRLIB_FILES)
-LOCAL_CPPFLAGS += -DLITTLEENDIAN_CPU
-
LOCAL_C_INCLUDES := \
$(MESA_TOP)/src \
$(MESA_TOP)/src/amd/common \
diff --git a/lib/mesa/src/amd/Android.common.mk b/lib/mesa/src/amd/Android.common.mk
index 23bf129d1..d5a266215 100644
--- a/lib/mesa/src/amd/Android.common.mk
+++ b/lib/mesa/src/amd/Android.common.mk
@@ -20,8 +20,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-ifeq ($(MESA_ENABLE_LLVM),true)
-
# ---------------------------------------
# Build libmesa_amd_common
# ---------------------------------------
@@ -32,8 +30,9 @@ LOCAL_MODULE := libmesa_amd_common
LOCAL_SRC_FILES := \
$(AMD_COMMON_FILES) \
- $(AMD_COMMON_LLVM_FILES) \
- $(AMD_DEBUG_FILES)
+ $(AMD_COMPILER_FILES) \
+ $(AMD_DEBUG_FILES) \
+ $(AMD_NIR_FILES)
LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU # instructs LLVM to declare LLVMInitializeAMDGPU* functions
@@ -42,23 +41,14 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(AMD_GENERATED_FILES))
-AMD_JSON_FILES := \
- $(LOCAL_PATH)/registers/gfx6.json \
- $(LOCAL_PATH)/registers/gfx7.json \
- $(LOCAL_PATH)/registers/gfx8.json \
- $(LOCAL_PATH)/registers/gfx81.json \
- $(LOCAL_PATH)/registers/gfx9.json \
- $(LOCAL_PATH)/registers/gfx10.json \
- $(LOCAL_PATH)/registers/gfx103.json \
- $(LOCAL_PATH)/registers/pkt3.json \
- $(LOCAL_PATH)/registers/gfx10-rsrc.json \
- $(LOCAL_PATH)/registers/registers-manually-defined.json
-
SID_TABLES := $(LOCAL_PATH)/common/sid_tables.py
SID_TABLES_INPUTS := \
$(LOCAL_PATH)/common/sid.h \
- $(AMD_JSON_FILES)
+ $(LOCAL_PATH)/registers/amdgfxregs.json \
+ $(LOCAL_PATH)/registers/pkt3.json \
+ $(LOCAL_PATH)/registers/gfx10.json \
+ $(LOCAL_PATH)/registers/gfx10-rsrc.json
$(intermediates)/common/sid_tables.h: $(SID_TABLES) $(SID_TABLES_INPUTS)
@mkdir -p $(dir $@)
@@ -68,34 +58,21 @@ $(intermediates)/common/sid_tables.h: $(SID_TABLES) $(SID_TABLES_INPUTS)
AMDGFXREGS := $(LOCAL_PATH)/registers/makeregheader.py
AMDGFXREGS_INPUTS := \
- $(AMD_JSON_FILES)
+ $(LOCAL_PATH)/registers/amdgfxregs.json \
+ $(LOCAL_PATH)/registers/pkt3.json \
+ $(LOCAL_PATH)/registers/gfx10.json \
+ $(LOCAL_PATH)/registers/gfx10-rsrc.json
$(intermediates)/common/amdgfxregs.h: $(AMDGFXREGS) $(AMDGFXREGS_INPUTS)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(MESA_PYTHON2) $(AMDGFXREGS) $(AMDGFXREGS_INPUTS) --sort address --guard AMDGFXREGS_H > $@ || ($(RM) $@; false)
-GEN10_FORMAT_TABLE_INPUTS := \
- $(MESA_TOP)/src/util/format/u_format.csv \
- $(MESA_TOP)/src/amd/registers/gfx10-rsrc.json
-
-GEN10_FORMAT_TABLE_DEP := \
- $(MESA_TOP)/src/amd/registers/regdb.py
-
-GEN10_FORMAT_TABLE := $(LOCAL_PATH)/common/gfx10_format_table.py
-
-$(intermediates)/common/gfx10_format_table.c: $(GEN10_FORMAT_TABLE) $(GEN10_FORMAT_TABLE_INPUTS) $(GEN10_FORMAT_TABLE_DEP)
- @mkdir -p $(dir $@)
- @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
- $(hide) $(MESA_PYTHON2) $(GEN10_FORMAT_TABLE) $(GEN10_FORMAT_TABLE_INPUTS) > $@ || ($(RM) $@; false)
-
LOCAL_C_INCLUDES := \
$(MESA_TOP)/include \
$(MESA_TOP)/src \
$(MESA_TOP)/src/amd/common \
- $(MESA_TOP)/src/amd/llvm \
$(MESA_TOP)/src/compiler \
- $(MESA_TOP)/src/compiler/nir \
$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/gallium/auxiliary \
@@ -104,7 +81,6 @@ LOCAL_C_INCLUDES := \
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/common \
- $(LOCAL_PATH)/llvm \
$(intermediates)/common
LOCAL_SHARED_LIBRARIES := \
@@ -120,5 +96,3 @@ $(call mesa-build-with-llvm)
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
-
-endif # MESA_ENABLE_LLVM == true
diff --git a/lib/mesa/src/amd/Android.mk b/lib/mesa/src/amd/Android.mk
index c9dbeafde..e40e7da01 100644
--- a/lib/mesa/src/amd/Android.mk
+++ b/lib/mesa/src/amd/Android.mk
@@ -28,6 +28,5 @@ include $(LOCAL_PATH)/Makefile.sources
include $(LOCAL_PATH)/Android.addrlib.mk
include $(LOCAL_PATH)/Android.common.mk
ifneq ($(filter radeonsi,$(BOARD_GPU_DRIVERS)),)
-include $(LOCAL_PATH)/Android.compiler.mk
include $(LOCAL_PATH)/vulkan/Android.mk
endif
diff --git a/lib/mesa/src/amd/vulkan/Android.mk b/lib/mesa/src/amd/vulkan/Android.mk
index f0eb5119a..d0002b8aa 100644
--- a/lib/mesa/src/amd/vulkan/Android.mk
+++ b/lib/mesa/src/amd/vulkan/Android.mk
@@ -30,7 +30,6 @@ include $(LOCAL_PATH)/Makefile.sources
RADV_COMMON_INCLUDES := \
$(MESA_TOP)/include \
$(MESA_TOP)/src/ \
- $(MESA_TOP)/src/amd/vulkan \
$(MESA_TOP)/src/vulkan/wsi \
$(MESA_TOP)/src/vulkan/util \
$(MESA_TOP)/src/amd \
@@ -68,7 +67,6 @@ $(call mesa-build-with-llvm)
LOCAL_C_INCLUDES := $(RADV_COMMON_INCLUDES)
LOCAL_STATIC_LIBRARIES := \
- libmesa_aco \
libmesa_amd_common \
libmesa_nir \
libmesa_util \
@@ -77,23 +75,58 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_GENERATED_SOURCES += $(intermediates)/radv_entrypoints.c
LOCAL_GENERATED_SOURCES += $(intermediates)/radv_entrypoints.h
+LOCAL_GENERATED_SOURCES += $(intermediates)/radv_extensions.c
+LOCAL_GENERATED_SOURCES += $(intermediates)/radv_extensions.h
+LOCAL_GENERATED_SOURCES += $(intermediates)/vk_format_table.c
+LOCAL_GENERATED_SOURCES += $(intermediates)/gfx10_format_table.h
-RADV_ENTRYPOINTS_SCRIPT := $(MESA_TOP)/src/vulkan/util/vk_entrypoints_gen.py
+RADV_ENTRYPOINTS_SCRIPT := $(MESA_TOP)/src/amd/vulkan/radv_entrypoints_gen.py
+RADV_EXTENSIONS_SCRIPT := $(MESA_TOP)/src/amd/vulkan/radv_extensions.py
+VK_FORMAT_TABLE_SCRIPT := $(MESA_TOP)/src/amd/vulkan/vk_format_table.py
+VK_FORMAT_PARSE_SCRIPT := $(MESA_TOP)/src/amd/vulkan/vk_format_parse.py
vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml
+vk_format_layout_csv = $(MESA_TOP)/src/amd/vulkan/vk_format_layout.csv
$(intermediates)/radv_entrypoints.c: $(RADV_ENTRYPOINTS_SCRIPT) \
+ $(RADV_EXTENSIONS_SCRIPT) \
$(vulkan_api_xml)
@mkdir -p $(dir $@)
$(MESA_PYTHON2) $(RADV_ENTRYPOINTS_SCRIPT) \
--xml $(vulkan_api_xml) \
- --proto --weak \
- --out-c $@ \
- --out-h $(addsuffix .h,$(basename $@)) \
- --prefix radv --device-prefix sqtt
+ --outdir $(dir $@)
$(intermediates)/radv_entrypoints.h: $(intermediates)/radv_entrypoints.c
+$(intermediates)/radv_extensions.c: $(RADV_EXTENSIONS_SCRIPT) $(vulkan_api_xml)
+ @mkdir -p $(dir $@)
+ $(MESA_PYTHON2) $(RADV_EXTENSIONS_SCRIPT) \
+ --xml $(vulkan_api_xml) \
+ --out-c $@ \
+ --out-h $(addsuffix .h,$(basename $@))
+
+$(intermediates)/radv_extensions.h: $(intermediates)/radv_extensions.c
+
+$(intermediates)/vk_format_table.c: $(VK_FORMAT_TABLE_SCRIPT) \
+ $(VK_FORMAT_PARSE_SCRIPT) \
+ $(vk_format_layout_csv)
+ @mkdir -p $(dir $@)
+ $(MESA_PYTHON2) $(VK_FORMAT_TABLE_SCRIPT) $(vk_format_layout_csv) > $@
+
+RADV_GEN10_FORMAT_TABLE_INPUTS := \
+ $(MESA_TOP)/src/amd/vulkan/vk_format_layout.csv \
+ $(MESA_TOP)/src/amd/registers/gfx10-rsrc.json
+
+RADV_GEN10_FORMAT_TABLE_DEP := \
+ $(MESA_TOP)/src/amd/registers/regdb.py
+
+RADV_GEN10_FORMAT_TABLE := $(LOCAL_PATH)/gfx10_format_table.py
+
+$(intermediates)/gfx10_format_table.h: $(RADV_GEN10_FORMAT_TABLE) $(RADV_GEN10_FORMAT_TABLE_INPUTS) $(RADV_GEN10_FORMAT_TABLE_DEP)
+ @mkdir -p $(dir $@)
+ @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ $(hide) $(MESA_PYTHON2) $(RADV_GEN10_FORMAT_TABLE) $(RADV_GEN10_FORMAT_TABLE_INPUTS) > $@ || ($(RM) $@; false)
+
LOCAL_SHARED_LIBRARIES += $(RADV_SHARED_LIBRARIES)
LOCAL_EXPORT_C_INCLUDE_DIRS := \
@@ -134,10 +167,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_amdgpu_addrlib \
libmesa_amd_common \
libmesa_radv_common \
- libmesa_vulkan_util \
- libmesa_aco
+ libmesa_vulkan_util
-LOCAL_SHARED_LIBRARIES += $(RADV_SHARED_LIBRARIES) libz libsync liblog libcutils
+LOCAL_SHARED_LIBRARIES += $(RADV_SHARED_LIBRARIES) libz libsync liblog
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)