mesa: use default geometry's samples when there are no attachments
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 31 Jan 2016 06:09:40 +0000 (01:09 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 2 Feb 2016 22:08:46 +0000 (17:08 -0500)
Whether multisampling is turned on depends, in part, on whether
attachments are themselves multisample surfaces. However when there are
no attachments, we should rely on the default geometry for this.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/state.c

index 4043c4f20576600a63746fe4bf2a9f0a2bbf55ed..57f13411fdf66fc55f7930ae8c10104e8734d938 100644 (file)
@@ -352,7 +352,7 @@ update_multisample(struct gl_context *ctx)
    ctx->Multisample._Enabled = GL_FALSE;
    if (ctx->Multisample.Enabled &&
        ctx->DrawBuffer &&
-       ctx->DrawBuffer->Visual.sampleBuffers)
+       _mesa_geometric_samples(ctx->DrawBuffer) > 0)
       ctx->Multisample._Enabled = GL_TRUE;
 }