freedreno: fix handling for stream-out offsets
authorRob Clark <robclark@freedesktop.org>
Tue, 12 Apr 2016 15:30:31 +0000 (11:30 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 13 Apr 2016 18:15:54 +0000 (14:15 -0400)
If changed && append, we shouldn't be resetting the internal offset back
to zero.  This fixes issues w/ sequences like:

   glBeginTransformFeedback()
   glDraw()
   glPauseTransformFeedback()
   glDraw()
   glResumeTransformFeedback()
   glDraw()
   glEndTransformFeedback()

Fixes dEQP-GLES3.functional.transform_feedback.array.separate.points.lowp_vec3
and related tests.

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

index 685d3a756598b192750bbdd5605e6b3d536417ab..6c472d19815402699594f59f1c967803d708f593 100644 (file)
@@ -359,7 +359,8 @@ fd_set_stream_output_targets(struct pipe_context *pctx,
                if (!changed && append)
                        continue;
 
-               so->offsets[i] = 0;
+               if (!append)
+                       so->offsets[i] = offsets[i];
 
                pipe_so_target_reference(&so->targets[i], targets[i]);
        }