mesa/formats: Autogenerate the format_info structure from a CSV file

Instead of a having all of the format metadata in a gigantic hard-to-edit
array of type struct format_info, we now have a human-readable CSV file.
The CSV file also contains more format information than the format_info
struct contained so we can potentially make format_info more detailed later.

The python to generate the format information was added the previous
commit.  This commit turns it on in both automake and scons builds.

v2: Split into two commits and stuff to generate format_info.c from scons

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Jason Ekstrand
2014-06-20 15:52:10 -07:00
parent 3420565310
commit 12610ffcf7
4 changed files with 19 additions and 1738 deletions

View File

@@ -59,6 +59,13 @@ get_hash_header = env.CodeGenerate(
command = python_cmd + ' $SCRIPT ' + ' -f $SOURCE > $TARGET'
)
format_info = env.CodeGenerate(
target = 'main/format_info.c',
script = 'main/format_info.py',
source = 'main/formats.csv',
command = python_cmd + ' $SCRIPT ' + ' $SOURCE > $TARGET'
)
#
# Assembly sources
#