android: freedreno/hw/isa: Add description of ir3 ISA

Necessary to build libir3decode and libir3encode for Android

Fixes: 6d94f575d ("freedreno/hw/isa: Add description of ir3 ISA")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8538>
This commit is contained in:
Mauro Rossi 2021-01-16 21:36:47 +01:00
parent a183ee2ed7
commit 7c0298e2fe
3 changed files with 133 additions and 0 deletions

View file

@ -0,0 +1,123 @@
# Mesa 3-D graphics library
#
# Copyright (C) 2021 Mauro Rossi issor.oruam@gmail.com
#
# 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.
# Android.mk for libir3decode.a and libir3encode.a
# ---------------------------------------
# Build libir3decode
# ---------------------------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(decode_SOURCES)
LOCAL_MODULE := libir3decode
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
intermediates := $(call local-generated-sources-dir)
LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/gallium/auxiliary \
$(MESA_TOP)/src/freedreno/isa \
$(intermediates)/isa
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/isa/, ir3-isa.c)
ir3-isa_c_gen := \
$(MESA_TOP)/src/freedreno/isa/decode.py
ir3-isa_c_deps := \
$(MESA_TOP)/src/freedreno/isa/ir3.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-common.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat0.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat1.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat2.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat3.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat4.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat5.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat6.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat7.xml \
$(MESA_TOP)/src/freedreno/isa/isa.py
$(intermediates)/isa/ir3-isa.c: $(ir3-isa_c_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $(ir3-isa_c_gen) $< $@
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
# ---------------------------------------
# Build libir3encode
# ---------------------------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(encode_SOURCES)
LOCAL_MODULE := libir3encode
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
intermediates := $(call local-generated-sources-dir)
LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/compiler/nir \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/gallium/auxiliary \
$(MESA_TOP)/src/freedreno/isa \
$(intermediates)/isa
# We need libmesa_nir to get NIR's generated include directories.
LOCAL_STATIC_LIBRARIES := \
libmesa_nir
LOCAL_GENERATED_SOURCES := \
$(MESA_GEN_NIR_H)
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/isa/, encode.h)
encode_h_gen := \
$(MESA_TOP)/src/freedreno/isa/encode.py
encode_h_deps := \
$(MESA_TOP)/src/freedreno/isa/ir3.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-common.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat0.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat1.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat2.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat3.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat4.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat5.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat6.xml \
$(MESA_TOP)/src/freedreno/isa/ir3-cat7.xml \
$(MESA_TOP)/src/freedreno/isa/isa.py
$(intermediates)/isa/encode.h: $(encode_h_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $(encode_h_gen) $< $@
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)

View file

@ -29,5 +29,6 @@ include $(LOCAL_PATH)/Android.common.mk
include $(LOCAL_PATH)/Android.drm.mk
include $(LOCAL_PATH)/Android.ir2.mk
include $(LOCAL_PATH)/Android.ir3.mk
include $(LOCAL_PATH)/Android.isa.mk
include $(LOCAL_PATH)/Android.perfcntrs.mk
include $(LOCAL_PATH)/Android.registers.mk

View file

@ -6,6 +6,11 @@ common_SOURCES := \
common/freedreno_uuid.c \
common/freedreno_uuid.h
decode_SOURCES := \
isa/decode.c \
isa/decode.h \
isa/isa.h
drm_SOURCES := \
drm/freedreno_bo.c \
drm/freedreno_drmif.h \
@ -22,6 +27,10 @@ drm_SOURCES := \
drm/freedreno_priv.h \
drm/msm_ringbuffer.c
encode_SOURCES := \
isa/encode.c \
isa/isa.h
ir2_SOURCES := \
ir2/disasm-a2xx.c \
ir2/instr-a2xx.h