i965: Assert that the GL primitive isn't out of range.
authorMatt Turner <mattst88@gmail.com>
Mon, 22 Jun 2015 18:20:32 +0000 (11:20 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 23 Jun 2015 19:24:42 +0000 (12:24 -0700)
commitd8eeb4917ca39a0698731f64933c85a7c44e9247
treecdaa7e6a1952e5ae0bb98c36258c099bffa90900
parent4d93a07c45c8aa4cb3adbfcb9d61dcb54d8c404f
i965: Assert that the GL primitive isn't out of range.

Coverity sees the if (mode >= BRW_PRIM_OFFSET (128)) test and assumes
that the else-branch might execute for mode to up 127, which out be out
of bounds.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_draw.c