raster->line_stipple_factor = ctx->Line.StippleFactor - 1;
/* _NEW_MULTISAMPLE */
- if (ctx->Multisample._Enabled)
+ if (ctx->Multisample._Enabled || st->force_msaa)
raster->multisample = 1;
/* _NEW_SCISSOR */
}
+/**
+ * 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 )
{
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);
struct blit_state *blit;
struct cso_context *cso_context;
+
+ int force_msaa;
};
}
+extern int
+st_get_msaa(void);
+
+
#endif
{
struct st_framebuffer *stfb = CALLOC_STRUCT(st_framebuffer);
if (stfb) {
- int samples = 0;
- const char *msaa_override = _mesa_getenv("__GL_FSAA_MODE");
+ int samples = st_get_msaa();
+
+ if (visual->sampleBuffers)
+ samples = visual->samples;
+
_mesa_initialize_framebuffer(&stfb->Base, visual);
- if (visual->sampleBuffers) samples = visual->samples;
- if (msaa_override) {
- samples = _mesa_atoi(msaa_override);
- }
{
/* fake frontbuffer */