summaryrefslogtreecommitdiffstats
path: root/src/mesa/Android.gen.mk
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-06-20 16:53:36 -0700
committerChad Versace <[email protected]>2017-06-27 16:56:28 -0700
commita1983223d8839a0c9f5ca5aaf305ca6d2e01860b (patch)
tree514e67fd002ed15351dc746a0ff17c5df772d596 /src/mesa/Android.gen.mk
parent4a10d6154e1a6086e1eecf0e17ab63cc41862ea6 (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/Android.gen.mk')
-rw-r--r--src/mesa/Android.gen.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
index 366a6b1036e..8d242600f54 100644
--- a/src/mesa/Android.gen.mk
+++ b/src/mesa/Android.gen.mk
@@ -34,6 +34,7 @@ sources := \
main/enums.c \
main/api_exec.c \
main/dispatch.h \
+ main/format_fallback.c \
main/format_pack.c \
main/format_unpack.c \
main/format_info.h \
@@ -123,6 +124,17 @@ $(intermediates)/main/get_hash.h: $(glapi)/gl_and_es_API.xml \
$(LOCAL_PATH)/main/get_hash_params.py $(GET_HASH_GEN)
$(call es-gen)
+FORMAT_FALLBACK := $(LOCAL_PATH)/main/format_fallback.py
+format_fallback_deps := \
+ $(LOCAL_PATH)/main/formats.csv \
+ $(LOCAL_PATH)/main/format_parser.py \
+ $(FORMAT_FALLBACK)
+
+$(intermediates)/main/format_fallback.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_FALLBACK)
+$(intermediates)/main/format_fallback.c: PRIVATE_XML :=
+$(intermediates)/main/format_fallback.c: $(format_fallback_deps)
+ $(call es-gen, $<)
+
FORMAT_INFO := $(LOCAL_PATH)/main/format_info.py
format_info_deps := \
$(LOCAL_PATH)/main/formats.csv \