<div dir="ltr"><div>Can you remind me again as to what formats hit these paths?  I remember you hitting them, but I'm still not really seeing how it happens.<br></div>--Jason<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We can have conversions from non-integer types to integer types, so remove<br>
the assertions for these in the pack/unpack fast paths. It could be that<br>
we do not have all the necessary pack/unpack functions in these cases though,<br>
so protect these paths with conditionals and let _mesa_format_convert use<br>
other paths to resolve these kind of conversions if necessary.<br>
---<br>
 src/mesa/main/format_utils.c | 16 ++++++++--------<br>
 1 file changed, 8 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c<br>
index 1d65f2b..56a3b8d 100644<br>
--- a/src/mesa/main/format_utils.c<br>
+++ b/src/mesa/main/format_utils.c<br>
@@ -143,8 +143,8 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,<br>
             dst += dst_stride;<br>
          }<br>
          return;<br>
-      } else if (dst_array_format.as_uint == RGBA8888_UBYTE.as_uint) {<br>
-         assert(!_mesa_is_format_integer_color(src_format));<br>
+      } else if (dst_array_format.as_uint == RGBA8888_UBYTE.as_uint &&<br>
+                 !_mesa_is_format_integer_color(src_format)) {<br>
          for (row = 0; row < height; ++row) {<br>
             _mesa_unpack_ubyte_rgba_row(src_format, width,<br>
                                         src, (uint8_t (*)[4])dst);<br>
@@ -152,8 +152,8 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,<br>
             dst += dst_stride;<br>
          }<br>
          return;<br>
-      } else if (dst_array_format.as_uint == RGBA8888_UINT.as_uint) {<br>
-         assert(_mesa_is_format_integer_color(src_format));<br>
+      } else if (dst_array_format.as_uint == RGBA8888_UINT.as_uint &&<br>
+                 _mesa_is_format_integer_color(src_format)) {<br>
          for (row = 0; row < height; ++row) {<br>
             _mesa_unpack_uint_rgba_row(src_format, width,<br>
                                        src, (uint32_t (*)[4])dst);<br>
@@ -174,8 +174,8 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,<br>
             dst += dst_stride;<br>
          }<br>
          return;<br>
-      } else if (src_array_format.as_uint == RGBA8888_UBYTE.as_uint) {<br>
-         assert(!_mesa_is_format_integer_color(dst_format));<br>
+      } else if (src_array_format.as_uint == RGBA8888_UBYTE.as_uint &&<br>
+                 !_mesa_is_format_integer_color(dst_format)) {<br>
          for (row = 0; row < height; ++row) {<br>
             _mesa_pack_ubyte_rgba_row(dst_format, width,<br>
                                       (const uint8_t (*)[4])src, dst);<br>
@@ -183,8 +183,8 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,<br>
             dst += dst_stride;<br>
          }<br>
          return;<br>
-      } else if (src_array_format.as_uint == RGBA8888_UINT.as_uint) {<br>
-         assert(_mesa_is_format_integer_color(dst_format));<br>
+      } else if (src_array_format.as_uint == RGBA8888_UINT.as_uint &&<br>
+                 _mesa_is_format_integer_color(dst_format)) {<br>
          for (row = 0; row < height; ++row) {<br>
             _mesa_pack_uint_rgba_row(dst_format, width,<br>
                                      (const uint32_t (*)[4])src, dst);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>