diff options
author | Kenneth Graunke <[email protected]> | 2013-08-28 14:50:38 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-09-03 11:29:09 -0700 |
commit | 9f7d5870a31bc9fab6c42acba4ae97e4f9bdb2b9 (patch) | |
tree | 277eedfbc8db0227ddc20a3c90bf5b0f7004de4d /src/mesa/drivers/dri | |
parent | 6b5c802c30ada043ee31cc5e62249ff99bbc865f (diff) |
i965: Actually check every primitive for cut index support.
can_cut_index_handle_prims() was passed an array of _mesa_prim objects
and a count, and ran a loop for that many iterations. However, it
treated the array like a pointer, repeatedly checking the first element.
This patch makes it actually check every primitive.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_primitive_restart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c index 0dbc48fe3ef..b305dca57bb 100644 --- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c +++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c @@ -92,8 +92,8 @@ can_cut_index_handle_prims(struct gl_context *ctx, return false; } - for ( ; nr_prims > 0; nr_prims--) { - switch(prim->mode) { + for (int i = 0; i < nr_prims; i++) { + switch (prim[i].mode) { case GL_POINTS: case GL_LINES: case GL_LINE_STRIP: |