summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-01-26 10:09:37 -0700
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-02-13 18:46:40 +0100
commitd2d3cd2be78022e585b4a155d742d346471453d0 (patch)
tree512f6af454e73e9e4c8773f3bba9b25ad972703e
parentf4e33c551df241bb07a457c67ed515fdad72b5b4 (diff)
st/mesa: set ctx->Const.MaxSamples = 0, not 1
The gallium docs for pipe_screen::is_format_supported() says that samples==0 or samples==1 both mean that multisampling is not supported. Return GL_MAX_SAMPLES==0 instead of 1 for consistency with other drivers. Note: This is a candidate for the 9.0 branch. Reviewed-by: Marek Olšák <maraeo@gmail.com> (cherry picked from commit d60da27273d2cdb68bc32cae2ca66718dab15f27)
-rw-r--r--src/mesa/state_tracker/st_extensions.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index ac11f127c0..7cac78280b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -630,6 +630,10 @@ void st_init_extensions(struct st_context *st)
break;
}
}
+ if (ctx->Const.MaxSamples == 1) {
+ /* one sample doesn't really make sense */
+ ctx->Const.MaxSamples = 0;
+ }
if (ctx->Const.MaxDualSourceDrawBuffers > 0)
ctx->Extensions.ARB_blend_func_extended = GL_TRUE;