<div dir="ltr">On 31 July 2013 04:07, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</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">
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_context.h | 18 ++++++++++++++++++<br>
1 file changed, 18 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h<br>
index 7b5fd13..9580f29 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_context.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_context.h<br>
@@ -420,6 +420,24 @@ struct interpolation_mode_map {<br>
unsigned char mode[BRW_VARYING_SLOT_COUNT];<br>
};<br>
<br>
+static inline int brw_any_flat_varyings(struct interpolation_mode_map *map)<br>
+{<br>
+ for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)<br>
+ if (map->mode[i] == INTERP_QUALIFIER_FLAT)<br>
+ return 1;<br>
+<br>
+ return 0;<br>
+}<br>
+<br>
+static inline int brw_any_noperspective_varyings(struct interpolation_mode_map *map)<br>
+{<br>
+ for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)<br>
+ if (map->mode[i] == INTERP_QUALIFIER_NOPERSPECTIVE)<br>
+ return 1;<br>
+<br>
+ return 0;<br>
+}<br>
+<br></blockquote><div><br></div><div>Can we please make these functions return bool instead of int? Using int instead of bool is dangerous, and has caused real bugs (see <a href="https://bugs.freedesktop.org/show_bug.cgi?id=54805" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=54805</a> for example).<br>
<br></div><div>With that fixed, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
struct brw_sf_prog_data {<br>
GLuint urb_read_length;<br>
<span><font color="#888888">--<br>
1.8.3.4<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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>