diff options
author | Ben Skeggs <[email protected]> | 2008-07-05 00:53:13 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-07-05 00:53:13 +1000 |
commit | 77f8167d75d0016c76812fc147c06072e5729965 (patch) | |
tree | f610929b3fa6d62013593df797b9e05d7c1452b4 /src/mesa/main/state.c | |
parent | 6f56b527d866506a323feb19f9d8529d40034af2 (diff) | |
parent | 194cfc7a4ed86653db34be0e331ad7c23b5334eb (diff) |
Merge remote branch 'upstream/gallium-0.1' into gallium-0.1
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r-- | src/mesa/main/state.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 315253d90a7..344af91e172 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -289,6 +289,20 @@ update_viewport_matrix(GLcontext *ctx) /** + * Update derived multisample state. + */ +static void +update_multisample(GLcontext *ctx) +{ + ctx->Multisample._Enabled = GL_FALSE; + if (ctx->DrawBuffer) { + if (ctx->DrawBuffer->Visual.sampleBuffers) + ctx->Multisample._Enabled = GL_TRUE; + } +} + + +/** * Update derived color/blend/logicop state. */ static void @@ -425,6 +439,9 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT)) update_viewport_matrix(ctx); + if (new_state & _NEW_MULTISAMPLE) + update_multisample( ctx ); + if (new_state & _NEW_COLOR) update_color( ctx ); |