[Mesa-dev] [PATCH v2 5/5] i965: Shrink brw_vue_map struct.

Eric Anholt eric at anholt.net
Fri Mar 22 12:32:19 PDT 2013


Paul Berry <stereotype441 at gmail.com> writes:
> diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
> index c8ca018..7e941dd 100644
> --- a/src/mesa/drivers/dri/i965/brw_vs.c
> +++ b/src/mesa/drivers/dri/i965/brw_vs.c
> @@ -66,6 +66,12 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vs_compile *c,
>     vue_map->slots_valid = slots_valid;
>     int i;
>  
> +   /* Make sure that the values we store in vue_map->vert_result_to_slot and
> +    * vue_map->slot_to_vert_result won't overflow the signed chars that are
> +    * used to store them.
> +    */
> +   STATIC_ASSERT(BRW_VARYING_SLOT_MAX <= 128);

If the max varying slot was 128, that would be overflowed, right?

With s/128/127/, the series is:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130322/253d6202/attachment.pgp>


More information about the mesa-dev mailing list