<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 9:09 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com" target="_blank">nanley.g.chery@intel.com</a>><br>
<br>
Determines if a compressed format is non-palettized and specific.<br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com" target="_blank">nanley.g.chery@intel.com</a>><br>
---<br>
src/mesa/main/texcompress.c | 10 ++++++++++<br>
src/mesa/main/texcompress.h | 3 +++<br>
2 files changed, 13 insertions(+)<br>
<br>
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c<br>
index 84973d3..c8598bd 100644<br>
--- a/src/mesa/main/texcompress.c<br>
+++ b/src/mesa/main/texcompress.c<br>
@@ -547,6 +547,16 @@ _mesa_glenum_to_compressed_format(GLenum format)<br>
}<br>
}<br>
<br>
+/**<br>
+ * Return whether or not the format is a specific, non-palettized compressed<br>
+ * format. This works because all MESA_FORMATs for compressed GL formats<br>
+ * correspond to non-generic compressed formats.<br>
+ */<br>
+bool<br>
+_mesa_is_specific_np_compressed_format(GLenum format)<br>
+{<br>
+ return _mesa_glenum_to_compressed_format(format) != MESA_FORMAT_NONE;<br>
+}<br>
<br>
/**<br>
* Given a compressed MESA_FORMAT_x value, return the corresponding<br>
diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h<br>
index b00924d..b088dd2 100644<br>
--- a/src/mesa/main/texcompress.h<br>
+++ b/src/mesa/main/texcompress.h<br>
@@ -39,6 +39,9 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats);<br>
extern mesa_format<br>
_mesa_glenum_to_compressed_format(GLenum format);<br>
<br>
+extern bool<br>
+_mesa_is_specific_np_compressed_format(GLenum format);<br>
+<br>
extern GLenum<br>
_mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat);<br>
<span><font color="#888888"><br>
--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">LGTM. Both patches are:</div><div class="gmail_extra">Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></div></div>