diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-17 14:32:33 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-17 14:32:33 -0600 |
commit | 1a820f52f6fa125786538c1adf2aa350e66b8c1e (patch) | |
tree | 229a922b489441efe0390b5002fa5979842fb345 /src/mesa/state_tracker/st_context.c | |
parent | e6a120fefea44078b3a8d4292d83671e6c41357f (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.c | 15 |
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); |