summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-17 14:32:33 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-17 14:32:33 -0600
commit1a820f52f6fa125786538c1adf2aa350e66b8c1e (patch)
tree229a922b489441efe0390b5002fa5979842fb345 /src/mesa/state_tracker/st_context.c
parente6a120fefea44078b3a8d4292d83671e6c41357f (diff)
gallium: clean-up/fix msaa override in state tracker
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 534c7c12ac..cca808d328 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -88,6 +88,19 @@ void st_invalidate_state(GLcontext * ctx, GLuint new_state)
}
+/**
+ * Check for multisample env var override.
+ */
+int
+st_get_msaa(void)
+{
+ const char *msaa = _mesa_getenv("__GL_FSAA_MODE");
+ if (msaa)
+ return atoi(msaa);
+ return 0;
+}
+
+
static struct st_context *
st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
{
@@ -141,6 +154,8 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
st->pixel_xfer.cache = _mesa_new_program_cache();
+ st->force_msaa = st_get_msaa();
+
/* GL limits and extensions */
st_init_limits(st);
st_init_extensions(st);