mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
amd/common,radeonsi: Move gfx10_format_table to common.
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
This commit is contained in:
parent
d936f69677
commit
c98e52f88a
8 changed files with 32 additions and 32 deletions
|
|
@ -69,6 +69,20 @@ $(intermediates)/common/amdgfxregs.h: $(AMDGFXREGS) $(AMDGFXREGS_INPUTS)
|
|||
@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 \
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ AMD_DEBUG_FILES = \
|
|||
|
||||
AMD_GENERATED_FILES = \
|
||||
common/amdgfxregs.h \
|
||||
common/gfx10_format_table.h \
|
||||
common/sid_tables.h
|
||||
|
||||
ACO_FILES = \
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ import os
|
|||
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
|
||||
|
|
@ -36,6 +36,18 @@ amdgfxregs_h = custom_target(
|
|||
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',
|
||||
|
|
@ -56,7 +68,7 @@ amd_common_files = files(
|
|||
|
||||
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,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -66,20 +66,6 @@ $(intermediates)/radeonsi/si_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)
|
|||
@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)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
GENERATED_SOURCES := \
|
||||
gfx10_format_table.h \
|
||||
si_driinfo.h
|
||||
|
||||
C_SOURCES := \
|
||||
|
|
|
|||
|
|
@ -103,21 +103,9 @@ si_driinfo_h = custom_target(
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ struct gfx10_format {
|
|||
bool buffers_only : 1;
|
||||
};
|
||||
|
||||
#include "gfx10_format_table.h"
|
||||
#include "amd/common/gfx10_format_table.h"
|
||||
|
||||
static unsigned si_map_swizzle(unsigned swizzle)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue