mesa: Include the multisample enables under GL_MULTISAMPLE_BIT attrib as well.
authorEric Anholt <eric@anholt.net>
Mon, 13 Feb 2012 21:36:06 +0000 (13:36 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 15 Feb 2012 23:31:33 +0000 (15:31 -0800)
Fixes (with the previous commit) piglit GL_ARB_multisample/pushpop.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/attrib.c

index 5b1db29dde6ccf67b981883e96f3e1e8ec7dd5f3..7042312a8f507299915a0e38f63e3151ce6ba54f 100644 (file)
@@ -617,8 +617,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
                    enable->VertexProgramTwoSide,
                    GL_VERTEX_PROGRAM_TWO_SIDE_ARB);
 
-#undef TEST_AND_UPDATE
-
    /* texture unit enables */
    for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
       const GLbitfield enabled = enable->Texture[i];
@@ -1270,6 +1268,23 @@ _mesa_PopAttrib(void)
             {
                const struct gl_multisample_attrib *ms;
                ms = (const struct gl_multisample_attrib *) attr->data;
+
+              TEST_AND_UPDATE(ctx->Multisample.Enabled,
+                              ms->Enabled,
+                              GL_MULTISAMPLE);
+
+              TEST_AND_UPDATE(ctx->Multisample.SampleCoverage,
+                              ms->SampleCoverage,
+                              GL_SAMPLE_COVERAGE);
+
+              TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage,
+                              ms->SampleAlphaToCoverage,
+                              GL_SAMPLE_ALPHA_TO_COVERAGE);
+
+              TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToOne,
+                              ms->SampleAlphaToOne,
+                              GL_SAMPLE_ALPHA_TO_ONE);
+
                _mesa_SampleCoverageARB(ms->SampleCoverageValue,
                                        ms->SampleCoverageInvert);
             }