gallium: clean-up/fix msaa override in state tracker

This commit is contained in:
Brian Paul
2008-09-17 14:32:33 -06:00
parent e6a120fefe
commit 1a820f52f6
4 changed files with 27 additions and 7 deletions

View File

@@ -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);