<div dir="ltr">On 2 December 2013 11:36, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
 src/mesa/drivers/dri/i965/brw_reg.h | 21 +++++++++++++++++++++<br>
 1 file changed, 21 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h<br>
index 37a2ca9..2591cbf 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_reg.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_reg.h<br>
@@ -154,6 +154,27 @@ type_sz(unsigned type)<br>
    }<br>
 }<br>
<br>
+static inline bool<br>
+type_is_signed(unsigned type)<br>
+{<br>
+   switch(type) {<br>
+   case BRW_REGISTER_TYPE_D:<br>
+   case BRW_REGISTER_TYPE_F:<br>
+   case BRW_REGISTER_TYPE_HF:<br>
+   case BRW_REGISTER_TYPE_W:<br>
+   case BRW_REGISTER_TYPE_B:<br>
+      return true;<br>
+<br>
+   case BRW_REGISTER_TYPE_UD:<br>
+   case BRW_REGISTER_TYPE_UW:<br>
+   case BRW_REGISTER_TYPE_UB:<br>
+      return false;<br>
+<br>
+   default:<br>
+      unreachable();<br>
+   }<br>
+}<br>
+<br></blockquote><div><br></div><div>If the call to unreachable() is replaced with an assertion (as we've discussed elsewhere on the list), this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div></div></div></div>