<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 7:50 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">From: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
<br>
This enables us to predicate statments on a compressed format being<br>
a type of LATC format. Also, remove the comment that lists the enum<br>
(which was getting a tad long).<br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
src/mesa/main/format_info.py | 2 +-<br>
src/mesa/main/formats.c | 11 -----------<br>
src/mesa/main/formats.csv | 8 ++++----<br>
src/mesa/main/formats.h | 1 +<br>
src/mesa/main/texcompress.c | 1 +<br>
5 files changed, 7 insertions(+), 16 deletions(-)<br>
<br>
diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py<br>
index 22eb5a7..50626a85 100644<br>
--- a/src/mesa/main/format_info.py<br>
+++ b/src/mesa/main/format_info.py<br>
@@ -111,7 +111,7 @@ def get_channel_bits(fmat, chan_name):<br>
return 1 if fmat.has_channel('a') else 0<br>
else:<br>
return 0<br>
- elif fmat.layout == 'rgtc':<br>
+ elif fmat.layout in ('rgtc', 'latc'):<br>
return 8 if fmat.has_channel(chan_name) else 0<br>
elif fmat.layout in ('etc1', 'etc2'):<br>
if fmat.name.endswith('_ALPHA1') and chan_name == 'a':<br>
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c<br>
index 587221c..a2a7da6 100644<br>
--- a/src/mesa/main/formats.c<br>
+++ b/src/mesa/main/formats.c<br>
@@ -188,17 +188,6 @@ _mesa_get_format_max_bits(mesa_format format)<br>
<br>
/**<br>
* Return the layout type of the given format.<br>
- * The return value will be one of:<br>
- * MESA_FORMAT_LAYOUT_ARRAY<br>
- * MESA_FORMAT_LAYOUT_PACKED<br>
- * MESA_FORMAT_LAYOUT_S3TC<br>
- * MESA_FORMAT_LAYOUT_RGTC<br>
- * MESA_FORMAT_LAYOUT_FXT1<br>
- * MESA_FORMAT_LAYOUT_ETC1<br>
- * MESA_FORMAT_LAYOUT_ETC2<br>
- * MESA_FORMAT_LAYOUT_BPTC<br>
- * MESA_FORMAT_LAYOUT_ASTC<br>
- * MESA_FORMAT_LAYOUT_OTHER<br>
*/<br>
extern enum mesa_format_layout<br>
_mesa_get_format_layout(mesa_format format)<br>
diff --git a/src/mesa/main/formats.csv b/src/mesa/main/formats.csv<br>
index 80729d9..341b1be 100644<br>
--- a/src/mesa/main/formats.csv<br>
+++ b/src/mesa/main/formats.csv<br>
@@ -278,10 +278,10 @@ MESA_FORMAT_RG_RGTC2_UNORM , rgtc , 4, 4, x128, , ,<br>
MESA_FORMAT_RG_RGTC2_SNORM , rgtc , 4, 4, x128, , , , xy01, rgb<br>
<br>
# LATC1/2 compressed formats<br>
-MESA_FORMAT_L_LATC1_UNORM , rgtc , 4, 4, x64 , , , , xxx1, rgb<br>
-MESA_FORMAT_L_LATC1_SNORM , rgtc , 4, 4, x64 , , , , xxx1, rgb<br>
-MESA_FORMAT_LA_LATC2_UNORM , rgtc , 4, 4, x128, , , , xxxy, rgb<br>
-MESA_FORMAT_LA_LATC2_SNORM , rgtc , 4, 4, x128, , , , xxxy, rgb<br>
+MESA_FORMAT_L_LATC1_UNORM , latc , 4, 4, x64 , , , , xxx1, rgb<br>
+MESA_FORMAT_L_LATC1_SNORM , latc , 4, 4, x64 , , , , xxx1, rgb<br>
+MESA_FORMAT_LA_LATC2_UNORM , latc , 4, 4, x128, , , , xxxy, rgb<br>
+MESA_FORMAT_LA_LATC2_SNORM , latc , 4, 4, x128, , , , xxxy, rgb<br>
<br>
# ETC1/2 compressed formats<br>
MESA_FORMAT_ETC1_RGB8 , etc1 , 4, 4, x64 , , , , xyz1, rgb<br>
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h<br>
index ccb09b2..5d4d9a6 100644<br>
--- a/src/mesa/main/formats.h<br>
+++ b/src/mesa/main/formats.h<br>
@@ -66,6 +66,7 @@ enum mesa_format_layout {<br>
MESA_FORMAT_LAYOUT_PACKED,<br>
MESA_FORMAT_LAYOUT_S3TC,<br>
MESA_FORMAT_LAYOUT_RGTC,<br>
+ MESA_FORMAT_LAYOUT_LATC,<br>
MESA_FORMAT_LAYOUT_FXT1,<br>
MESA_FORMAT_LAYOUT_ETC1,<br>
MESA_FORMAT_LAYOUT_ETC2,<br>
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c<br>
index 394c8ba..e0294a8 100644<br>
--- a/src/mesa/main/texcompress.c<br>
+++ b/src/mesa/main/texcompress.c<br>
@@ -728,6 +728,7 @@ _mesa_get_compressed_fetch_func(mesa_format format)<br>
case MESA_FORMAT_LAYOUT_FXT1:<br>
return _mesa_get_fxt_fetch_func(format);<br>
case MESA_FORMAT_LAYOUT_RGTC:<br>
+ case MESA_FORMAT_LAYOUT_LATC:<br>
return _mesa_get_compressed_rgtc_func(format);<br>
case MESA_FORMAT_LAYOUT_ETC1:<br>
return _mesa_get_etc_fetch_func(format);<br>
<span class=""><font color="#888888">--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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></font></span></blockquote><div><br></div><div><br></div><div>Looks good to me.</div><div> </div></div>Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br></div></div>