[Mesa-dev] [PATCH 1/6] st/mesa: remove a weird msaa hack

Marek Olšák maraeo at gmail.com
Sat Dec 8 06:40:17 PST 2012


It doesn't work and it's not clear how it's supposed to work.
---
 src/mesa/state_tracker/st_atom_rasterizer.c |    3 +--
 src/mesa/state_tracker/st_context.c         |   17 -----------------
 src/mesa/state_tracker/st_context.h         |    4 ----
 src/mesa/state_tracker/st_manager.c         |    7 +------
 4 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index d9e9d21..f20df9e 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -230,8 +230,7 @@ static void update_raster_state( struct st_context *st )
    raster->line_stipple_factor = ctx->Line.StippleFactor - 1;
 
    /* _NEW_MULTISAMPLE */
-   if (ctx->Multisample._Enabled || st->force_msaa)
-      raster->multisample = 1;
+   raster->multisample = ctx->Multisample._Enabled;
 
    /* _NEW_SCISSOR */
    if (ctx->Scissor.Enabled)
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 69bd503..efac9ee 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -97,22 +97,6 @@ void st_invalidate_state(struct gl_context * ctx, GLuint new_state)
    _vbo_InvalidateState(ctx, 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( struct gl_context *ctx, struct pipe_context *pipe,
 		const struct st_config_options *options)
@@ -193,7 +177,6 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
 
    st->pixel_xfer.cache = _mesa_new_program_cache();
 
-   st->force_msaa = st_get_msaa();
    st->has_stencil_export =
       screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT);
 
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 2cc5277..8e6f28b 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -185,7 +185,6 @@ struct st_context
 
    struct cso_context *cso_context;
 
-   int force_msaa;
    void *winsys_drawable_handle;
 
    /* The number of vertex buffers from the last call of validate_arrays. */
@@ -265,9 +264,6 @@ st_fb_orientation(const struct gl_framebuffer *fb)
 #define ST_CALLOC_STRUCT(T)   (struct T *) calloc(1, sizeof(struct T))
 
 
-extern int
-st_get_msaa(void);
-
 extern struct st_context *
 st_create_context(gl_api api, struct pipe_context *pipe,
                   const struct gl_config *visual,
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index b065db0..e97b3f3 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -285,7 +285,6 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
 {
    struct gl_renderbuffer *rb;
    enum pipe_format format;
-   int samples;
    boolean sw;
 
    if (!stfb->iface)
@@ -313,11 +312,7 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
    if (format == PIPE_FORMAT_NONE)
       return FALSE;
 
-   samples = stfb->iface->visual->samples;
-   if (!samples)
-      samples = st_get_msaa();
-
-   rb = st_new_renderbuffer_fb(format, samples, sw);
+   rb = st_new_renderbuffer_fb(format, stfb->iface->visual->samples, sw);
    if (!rb)
       return FALSE;
 
-- 
1.7.10.4



More information about the mesa-dev mailing list