@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.h: $(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 \
AMD_GENERATED_FILES = \
common/amdgfxregs.h \
+ common/gfx10_format_table.h \
common/sid_tables.h
ACO_FILES = \
import re
import sys
-AMD_REGISTERS = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../../../amd/registers"))
-UTIL_FORMAT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../../../util/format"))
+AMD_REGISTERS = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../registers"))
+UTIL_FORMAT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../../util/format"))
sys.path.extend([AMD_REGISTERS, UTIL_FORMAT])
from regdb import Object, RegisterDatabase
capture : true,
)
+gfx10_format_table_h = custom_target(
+ 'gfx10_format_table.h',
+ input : files(
+ 'gfx10_format_table.py',
+ '../../util/format/u_format.csv', '../registers/gfx10-rsrc.json'
+ ),
+ output : 'gfx10_format_table.h',
+ command : [prog_python, '@INPUT@'],
+ capture : true,
+ depend_files : ['../registers/regdb.py']
+)
+
amd_common_files = files(
'ac_binary.c',
'ac_binary.h',
libamd_common = static_library(
'amd_common',
- [amd_common_files, sid_tables_h, amdgfxregs_h],
+ [amd_common_files, sid_tables_h, amdgfxregs_h, gfx10_format_table_h],
include_directories : [
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_compiler, inc_mapi, inc_amd,
],
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(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)/gfx10_format_table.py
-
-$(intermediates)/radeonsi/gfx10_format_table.h: $(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 += $(intermediates)/radeonsi
LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
GENERATED_SOURCES := \
- gfx10_format_table.h \
si_driinfo.h
C_SOURCES := \
capture : true,
)
-gfx10_format_table_h = custom_target(
- 'gfx10_format_table.h',
- input : files(
- 'gfx10_format_table.py',
- '../../../util/format/u_format.csv', '../../../amd/registers/gfx10-rsrc.json'
- ),
- output : 'gfx10_format_table.h',
- command : [prog_python, '@INPUT@'],
- capture : true,
- depend_files : ['../../../amd/registers/regdb.py']
-)
-
libradeonsi = static_library(
'radeonsi',
- [files_libradeonsi, si_driinfo_h, sid_tables_h, gfx10_format_table_h],
+ [files_libradeonsi, si_driinfo_h, sid_tables_h],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common, inc_amd_common_llvm,
inc_gallium_drivers,
bool buffers_only : 1;
};
-#include "gfx10_format_table.h"
+#include "amd/common/gfx10_format_table.h"
static unsigned si_map_swizzle(unsigned swizzle)
{