<div dir="ltr">On 22 March 2013 12:32, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
> diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c<br>
> index c8ca018..7e941dd 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_vs.c<br>
> +++ b/src/mesa/drivers/dri/i965/brw_vs.c<br>
> @@ -66,6 +66,12 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vs_compile *c,<br>
>     vue_map->slots_valid = slots_valid;<br>
>     int i;<br>
><br>
> +   /* Make sure that the values we store in vue_map->vert_result_to_slot and<br>
> +    * vue_map->slot_to_vert_result won't overflow the signed chars that are<br>
> +    * used to store them.<br>
> +    */<br>
> +   STATIC_ASSERT(BRW_VARYING_SLOT_MAX <= 128);<br>
<br>
</div>If the max varying slot was 128, that would be overflowed, right?<br></blockquote><div><br></div><div>Actually, BRW_VARYING_SLOT_MAX is a misnomer--it's actually the max varying slot + 1.  Want me to rename it BRW_NUM_VARYING_SLOT_MAX_PLUS_1 or something?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
With s/128/127/, the series is:<br>
<br>
Reviewed-by: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>><br>
</blockquote></div><br></div></div>