android: radv/gfx10: generate gfx10_format_table.h
authorMauro Rossi <issor.oruam@gmail.com>
Sun, 7 Jul 2019 23:17:22 +0000 (01:17 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Tue, 16 Jul 2019 19:31:24 +0000 (21:31 +0200)
This patch adds the missing building rules for Android,
to avoid following building errors:

In file included from external/mesa/src/amd/vulkan/radv_debug.c:35:
In file included from external/mesa/src/amd/vulkan/radv_debug.h:27:
external/mesa/src/amd/vulkan/radv_private.h:95:10:
fatal error: 'gfx10_format_table.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

In file included from external/mesa/src/amd/vulkan/radv_android.c:31:
external/mesa/src/amd/vulkan/radv_private.h:95:10:
fatal error: 'gfx10_format_table.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Fixes: 3dc5ec5d16 ("radv/gfx10: generate gfx10_format_table.h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/Android.mk
src/amd/vulkan/Makefile.sources

index 322620f36ef21baa829d70df00bc74a8eab9bf69..d0002b8aac51ed5290903c7208a6346ca127ddcd 100644 (file)
@@ -78,6 +78,7 @@ 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/amd/vulkan/radv_entrypoints_gen.py
 RADV_EXTENSIONS_SCRIPT := $(MESA_TOP)/src/amd/vulkan/radv_extensions.py
@@ -112,6 +113,20 @@ $(intermediates)/vk_format_table.c: $(VK_FORMAT_TABLE_SCRIPT) \
        @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 := \
index df90c1150af0a2d608c8293f8d5acc76e7be9e90..312cd0b1e99111e237c96fcf19c4a2d3e0c172f6 100644 (file)
@@ -91,5 +91,6 @@ VULKAN_GENERATED_FILES := \
        radv_entrypoints.h \
        radv_extensions.c \
        radv_extensions.h \
-       vk_format_table.c
+       vk_format_table.c \
+       gfx10_format_table.h