summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2016-02-04 16:12:05 +0000
committerNeil Roberts <neil@linux.intel.com>2016-02-05 11:05:01 +0000
commit4995d9c9a028876550e3da7ff24045f8bec2dcf6 (patch)
treed8bf87f7aa6affd3134217c8fd38115311a871a0 /src/mesa/main/get.c
parentd8d4661ddb2ecef33721fbca2a9bb7bd1d84b7cf (diff)
downloadexternal_mesa3d-4995d9c9a028876550e3da7ff24045f8bec2dcf6.zip
external_mesa3d-4995d9c9a028876550e3da7ff24045f8bec2dcf6.tar.gz
external_mesa3d-4995d9c9a028876550e3da7ff24045f8bec2dcf6.tar.bz2
main: Use _mesa_geometric_samples to calculate GL_SAMPLE_BUFFERS
Otherwise it won't take into account the default samples for framebuffers with no attachments. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 73aa8c5..73ff0b9 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1089,6 +1089,9 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
case GL_SAMPLES:
v->value_int = _mesa_geometric_samples(ctx->DrawBuffer);
break;
+ case GL_SAMPLE_BUFFERS:
+ v->value_int = _mesa_geometric_samples(ctx->DrawBuffer) > 0;
+ break;
}
}