[Mesa-dev] [PATCH] nir/i965: assert first is always less than 64

Matt Turner mattst88 at gmail.com
Thu Jan 12 17:30:21 UTC 2017


On Thu, Jan 12, 2017 at 3:24 AM, Juan A. Suarez Romero
<jasuarez at igalia.com> wrote:
> This fixes a defect detected by Coverity Scan.
> ---
>  src/mesa/drivers/dri/i965/brw_draw_upload.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
> index b7527f2cd9..abf3859614 100644
> --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
> @@ -482,6 +482,7 @@ brw_prepare_vertices(struct brw_context *brw)
>     brw->vb.nr_enabled = 0;
>     while (vs_inputs) {
>        GLuint first = ffsll(vs_inputs) - 1;
> +      assert (first < 64);

Extra space before (


More information about the mesa-dev mailing list