diff options
author | Juan A. Suarez Romero <[email protected]> | 2017-01-12 10:31:34 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2017-01-12 15:08:05 +0000 |
commit | ce44501ea87ff66267c9cf280e4596065ffebd46 (patch) | |
tree | 6bf6b8929724857f86c2043607edcf32cc9650bb | |
parent | f0997e2aa8b5628a8cccbd5adf9b22a053c6be54 (diff) |
nir/i965: assert first is always less than 64
This fixes a defect detected by Coverity Scan.
Reviewed-by: Iago Toral Quiroga <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index a865f2793d1..04d7aa9e9bf 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -566,6 +566,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); GLuint index = first - DIV_ROUND_UP(_mesa_bitcount_64(vs_prog_data->double_inputs_read & BITFIELD64_MASK(first)), 2); |