android: freedreno/ir3: add missing generated sources and rules
Changelog:
- Makefile.sources: add ir3_lexer.c and ir3_parser.{c,h} generated sources
- Android.ir3.mk: add the necessary generated sources rules
- Android.ir3.mk: add the necessary include paths
- src/gallium/drivers/freedreno/Android.gen.mk: generate only ir3_nir_{imul,trig}.c for the moment
Fixes the following building error:
target C: libfreedreno_ir3 <= external/mesa/src/freedreno/ir3/ir3_assembler.c
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/libfreedreno_ir3_intermediates/ir3/ir3_assembler.o
...
external/mesa/src/freedreno/ir3/ir3_assembler.c:28:10: fatal error: 'ir3_parser.h' file not found
^~~~~~~~~~~~~~
1 error generated.
Fixes: 1e8808a4a0 ("freedreno/ir3: refactor out helper to compile shader from asm")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5580>
This commit is contained in:
@@ -31,21 +31,51 @@ include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := \
|
||||
$(ir3_SOURCES)
|
||||
|
||||
LOCAL_MODULE := libfreedreno_ir3
|
||||
|
||||
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)/prebuilt-intermediates/nir \
|
||||
$(MESA_TOP)/src/freedreno/ir3 \
|
||||
$(intermediates)/ir3
|
||||
|
||||
# We need libmesa_nir to get NIR's generated include directories.
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libmesa_nir
|
||||
|
||||
LOCAL_MODULE := libfreedreno_ir3
|
||||
|
||||
LOCAL_GENERATED_SOURCES := \
|
||||
$(MESA_GEN_GLSL_H) \
|
||||
$(MESA_GEN_NIR_H)
|
||||
|
||||
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
|
||||
ir3/ir3_lexer.c ir3/ir3_parser.c ir3/ir3_parser.h)
|
||||
|
||||
ir3_lexer_deps := \
|
||||
$(MESA_TOP)/src/freedreno/ir3/ir3_lexer.l
|
||||
|
||||
ir3_parser_deps := \
|
||||
$(MESA_TOP)/src/freedreno/ir3/ir3_parser.y
|
||||
|
||||
$(intermediates)/ir3/ir3_lexer.c: $(ir3_lexer_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
|
||||
$(hide) flex -o $@ $<
|
||||
|
||||
$(intermediates)/ir3/ir3_parser.c: $(ir3_parser_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
|
||||
$(hide) bison $< --name-prefix=ir3_yy --output=$@
|
||||
|
||||
$(intermediates)/ir3/ir3_parser.h: $(ir3_parser_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
|
||||
$(hide) bison $< --name-prefix=ir3_yy --defines=$@
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -61,8 +61,11 @@ ir3_SOURCES := \
|
||||
ir3/ir3_validate.c
|
||||
|
||||
ir3_GENERATED_FILES := \
|
||||
ir3/ir3_lexer.c \
|
||||
ir3/ir3_nir_trig.c \
|
||||
ir3/ir3_nir_imul.c
|
||||
ir3/ir3_nir_imul.c \
|
||||
ir3/ir3_parser.c \
|
||||
ir3/ir3_parser.h
|
||||
|
||||
perfcntrs_SOURCES := \
|
||||
perfcntrs/fd2_perfcntr.c \
|
||||
|
||||
@@ -43,4 +43,4 @@ $(intermediates)/ir3/ir3_nir_imul.c: $(ir3_nir_imul_deps)
|
||||
$(hide) $(MESA_PYTHON2) $< -p $(MESA_TOP)/src/compiler/nir > $@
|
||||
|
||||
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
|
||||
$(ir3_GENERATED_FILES))
|
||||
ir3/ir3_nir_trig.c ir3/ir3_nir_imul.c)
|
||||
|
||||
Reference in New Issue
Block a user