summaryrefslogtreecommitdiff
path: root/src/amd
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2024-06-06 12:36:00 +0100
committerMarge Bot <emma+marge@anholt.net>2024-07-19 13:50:42 +0000
commitccc6442d6f0539571c413222e0d6aadc78bc5d4d (patch)
treef4787cdc8954695718d16209432deee15ba764f9 /src/amd
parent12a33ecd0f5371884b2e81ff9007c75cd86799aa (diff)
u_format: Rewrite format table to use YAML
u_format has always had its format table in CSV. This is kind of nice for some things, but is a serious pain to extend, especially with optional fields. In going through our many (many, many) duplicated tables of format mappings, it would've been nice to add some descriptions to our central u_format table, such as mapping to DRM FourCC, to EGLImage mappings, and to GL internalformats for EGLImage imports. Unfortunately, doing so with more additional fields would just make the CSV totally unreadable. Move the CSV table to a YAML-based table and adjust the Python parsers to suit. The resulting generated files are identical before and after the transition. The new parser also has a significant amount of format validation to make it easier to catch common errors. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index 6ac700c414d..bb9934e0a77 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -43,7 +43,7 @@ gfx10_format_table_c = custom_target(
'gfx10_format_table.c',
input : files(
'gfx10_format_table.py',
- '../../util/format/u_format.csv', '../registers/gfx10-rsrc.json', '../registers/gfx11-rsrc.json'
+ '../../util/format/u_format.yaml', '../registers/gfx10-rsrc.json', '../registers/gfx11-rsrc.json'
),
output : 'gfx10_format_table.c',
command : [prog_python, '@INPUT@'],