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/clear.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/clear.c')
-rw-r--r-- | src/mesa/main/clear.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 2e27c951bbb..bd5c012245a 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -200,7 +200,7 @@ _mesa_Clear( GLbitfield mask ) ctx->DrawBuffer->_Ymin >= ctx->DrawBuffer->_Ymax) return; - if (ctx->TransformFeedback.RasterDiscard) + if (ctx->RasterDiscard) return; if (ctx->RenderMode == GL_RENDER) { @@ -338,7 +338,7 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) drawbuffer); return; } - else if (!ctx->TransformFeedback.RasterDiscard) { + else if (!ctx->RasterDiscard) { /* Save current stencil clear value, set to 'value', do the * stencil clear and restore the clear value. * XXX in the future we may have a new ctx->Driver.ClearBuffer() @@ -362,7 +362,7 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) drawbuffer); return; } - else if (mask && !ctx->TransformFeedback.RasterDiscard) { + else if (mask && !ctx->RasterDiscard) { union gl_color_union clearSave; /* save color */ @@ -432,7 +432,7 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) drawbuffer); return; } - else if (mask && !ctx->TransformFeedback.RasterDiscard) { + else if (mask && !ctx->RasterDiscard) { union gl_color_union clearSave; /* save color */ @@ -513,7 +513,7 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) drawbuffer); return; } - else if (!ctx->TransformFeedback.RasterDiscard) { + else if (!ctx->RasterDiscard) { /* Save current depth clear value, set to 'value', do the * depth clear and restore the clear value. * XXX in the future we may have a new ctx->Driver.ClearBuffer() @@ -538,7 +538,7 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) drawbuffer); return; } - else if (mask && !ctx->TransformFeedback.RasterDiscard) { + else if (mask && !ctx->RasterDiscard) { union gl_color_union clearSave; /* save color */ @@ -615,7 +615,7 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, return; } - if (ctx->TransformFeedback.RasterDiscard) + if (ctx->RasterDiscard) return; if (ctx->NewState) { |