diff options
author | Paul Berry <[email protected]> | 2011-12-20 16:18:39 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-12-21 13:33:31 -0800 |
commit | aee96806f049c17384a8edc11acce76257d98a57 (patch) | |
tree | 59c1eda366888295e188e18858b146097035c17f /src/mesa/main/enable.c | |
parent | 636f2fc46c83d471b60b96bca1ced0c78b3415b5 (diff) |
mesa: Move RasterDiscard to toplevel of gl_context.
Previously we were storing the RasterDiscard flag (for
GL_RASTERIZER_DISCARD) in gl_context::TransformFeedback. This was
confusing, because we use the _NEW_TRANSFORM flag (not
_NEW_TRANSFORM_FEEDBACK) to track state updates to it, and because
rasterizer discard has effects even when transform feedback is not in
use.
This patch makes RasterDiscard a toplevel element in gl_context rather
than a subfield of gl_context::TransformFeedback.
Note: We can't put RasterDiscard inside gl_context::Transform, since
all items inside gl_context::Transform need to be pieces of state that
are saved and restored using PushAttrib and PopAttrib.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 6461ac1b3c9..749ae98f5ec 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -889,9 +889,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) #if FEATURE_EXT_transform_feedback case GL_RASTERIZER_DISCARD: CHECK_EXTENSION(EXT_transform_feedback, cap); - if (ctx->TransformFeedback.RasterDiscard != state) { + if (ctx->RasterDiscard != state) { FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->TransformFeedback.RasterDiscard = state; + ctx->RasterDiscard = state; } break; #endif @@ -1403,7 +1403,7 @@ _mesa_IsEnabled( GLenum cap ) #if FEATURE_EXT_transform_feedback case GL_RASTERIZER_DISCARD: CHECK_EXTENSION(EXT_transform_feedback); - return ctx->TransformFeedback.RasterDiscard; + return ctx->RasterDiscard; #endif /* GL_NV_primitive_restart */ |