diff options
author | Kenneth Graunke <[email protected]> | 2016-05-08 22:45:01 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-05-20 19:55:26 -0700 |
commit | 47fbe178fa631ae855fa862d638f5313a2b13bc3 (patch) | |
tree | 4858b92ed98a5924d9fd387df0a8f3fecbe61930 /src/mesa/main | |
parent | f7eb95a5269fab015df23dd7c5152418bbd10033 (diff) |
mesa: Call TransformFeedback driver hooks before setting flags.
This way, the driver's EndTransformFeedback() hook can tell whether the
transform feedback operation was paused. It's also convenient to have
Paused remain false until the driver's PauseTransformFeedback hook
finishes.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index c92f0ccd5a5..9c06bc84009 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -505,12 +505,12 @@ _mesa_EndTransformFeedback(void) FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; + assert(ctx->Driver.EndTransformFeedback); + ctx->Driver.EndTransformFeedback(ctx, obj); + ctx->TransformFeedback.CurrentObject->Active = GL_FALSE; ctx->TransformFeedback.CurrentObject->Paused = GL_FALSE; ctx->TransformFeedback.CurrentObject->EndedAnytime = GL_TRUE; - - assert(ctx->Driver.EndTransformFeedback); - ctx->Driver.EndTransformFeedback(ctx, obj); } @@ -1173,10 +1173,10 @@ _mesa_PauseTransformFeedback(void) FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; - obj->Paused = GL_TRUE; - assert(ctx->Driver.PauseTransformFeedback); ctx->Driver.PauseTransformFeedback(ctx, obj); + + obj->Paused = GL_TRUE; } |