diff options
author | Chad Versace <[email protected]> | 2017-06-20 16:53:36 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-06-27 16:56:28 -0700 |
commit | a1983223d8839a0c9f5ca5aaf305ca6d2e01860b (patch) | |
tree | 514e67fd002ed15351dc746a0ff17c5df772d596 /src/mesa/Makefile.am | |
parent | 4a10d6154e1a6086e1eecf0e17ab63cc41862ea6 (diff) |
mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]
The new function takes a mesa_format and, if the format is an alpha
format with a non-alpha variant, returns the non-alpha format.
Otherwise, it returns the original format.
Example:
input -> output
// Fallback exists
MESA_FORMAT_R8G8B8X8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM
MESA_FORMAT_RGBX_UNORM16 -> MESA_FORMAT_RGBA_UNORM16
// No fallback
MESA_FORMAT_R8G8B8A8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM
MESA_FORMAT_Z_FLOAT32 -> MESA_FORMAT_Z_FLOAT32
i965 will use this for EGLImages and DRIimages.
v2 (Jason Ekstrand):
- Use mako
- Rework to be easier to read
- Write directly to the output file
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/Makefile.am')
-rw-r--r-- | src/mesa/Makefile.am | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index 53f311d2a97..97a9bbd8c25 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -37,6 +37,7 @@ include Makefile.sources EXTRA_DIST = \ drivers/SConscript \ + main/format_fallback.py \ main/format_info.py \ main/format_pack.py \ main/format_parser.py \ @@ -54,6 +55,7 @@ EXTRA_DIST = \ BUILT_SOURCES = \ main/get_hash.h \ + main/format_fallback.c \ main/format_info.h \ main/format_pack.c \ main/format_unpack.c \ @@ -70,6 +72,11 @@ main/get_hash.h: ../mapi/glapi/gen/gl_and_es_API.xml main/get_hash_params.py \ $(PYTHON_GEN) $(srcdir)/main/get_hash_generator.py \ -f $(srcdir)/../mapi/glapi/gen/gl_and_es_API.xml > $@ +main/format_fallback.c: main/format_fallback.py \ + main/format_parser.py \ + main/formats.csv + $(PYTHON_GEN) $(srcdir)/main/format_fallback.py $(srcdir)/main/formats.csv $@ + main/format_info.h: main/formats.csv \ main/format_parser.py main/format_info.py $(PYTHON_GEN) $(srcdir)/main/format_info.py $(srcdir)/main/formats.csv > $@ |