aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/translate/translate.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-11 21:19:12 +0200
committerLuca Barbieri <[email protected]>2010-08-11 21:47:27 +0200
commit10adb7840c3a37dedc940fe593b246336eebd71e (patch)
tree2c51fbde6dc8329bcd03d3b4bed61e8446a4fd18 /src/gallium/auxiliary/translate/translate.c
parent27fe2347bc2ddf88cb666a95adfb0b12a39d42b9 (diff)
translate: allow clients to ask for supported output formats
Currently translate asserts on unsupported output formats, making it impossible to use for some purposes, such as testing whether it actually works on all formats it supports. Removing the assert was met with opposition, so this change allows clients to ask whether an output format is supported, and they are thus able to avoid attempting to use it. Since this is just an addition to the API, no adverse effect is possible, and it makes the testsuite work again.
Diffstat (limited to 'src/gallium/auxiliary/translate/translate.c')
-rw-r--r--src/gallium/auxiliary/translate/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/translate/translate.c b/src/gallium/auxiliary/translate/translate.c
index a9b7253bf44..fe638e211fa 100644
--- a/src/gallium/auxiliary/translate/translate.c
+++ b/src/gallium/auxiliary/translate/translate.c
@@ -48,3 +48,8 @@ struct translate *translate_create( const struct translate_key *key )
return translate_generic_create( key );
}
+
+boolean translate_is_output_format_supported(enum pipe_format format)
+{
+ return translate_generic_is_output_format_supported(format);
+}