add env var to override msaa visual selection
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 20 Jul 2008 08:49:48 +0000 (10:49 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Tue, 22 Jul 2008 14:51:48 +0000 (16:51 +0200)
src/mesa/state_tracker/st_framebuffer.c

index 1994a1c8260c57bb6eb83c058bca5e67db2e0114..039a9cfe8996bb4976bdbd522394582aadbcefc4 100644 (file)
@@ -52,8 +52,12 @@ st_create_framebuffer( const __GLcontextModes *visual,
    struct st_framebuffer *stfb = CALLOC_STRUCT(st_framebuffer);
    if (stfb) {
       int samples = 0;
+      const char *msaa_override = _mesa_getenv("__GL_FSAA_MODE");
       _mesa_initialize_framebuffer(&stfb->Base, visual);
       if (visual->sampleBuffers) samples = visual->samples;
+      if (msaa_override) {
+         samples = _mesa_atoi(msaa_override);
+      }
 
       {
          /* fake frontbuffer */