freedreno: fix stream-out offset handling for lines/tris
authorRob Clark <robclark@freedesktop.org>
Tue, 12 Apr 2016 16:11:07 +0000 (12:11 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 13 Apr 2016 18:16:02 +0000 (14:16 -0400)
We need to increment offset by # of vertices, not by # of prims.  Fixes
a bunch of dEQP fails involving prims other than points.  For example,
dEQP-GLES3.functional.transform_feedback.position.lines_separate

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_draw.c

index 11d9f64..66bb116 100644 (file)
@@ -198,7 +198,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
        ctx->draw_vbo(ctx, info);
 
        for (i = 0; i < ctx->streamout.num_targets; i++)
-               ctx->streamout.offsets[i] += prims;
+               ctx->streamout.offsets[i] += info->count;
 
        if (fd_mesa_debug & FD_DBG_DDRAW)
                ctx->dirty = 0xffffffff;