[Mesa-dev] [PATCH 2/4] st/mesa: remove a redundant call to _mesa_is_multisample_enabled
Nicolai Hähnle
nhaehnle at gmail.com
Wed Nov 16 09:42:53 UTC 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
We called it immediately prior, so re-use the previously returned value.
---
src/mesa/state_tracker/st_atom_rasterizer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 8503041..50be7b6 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -246,21 +246,21 @@ static void update_raster_state( struct st_context *st )
raster->line_stipple_pattern = ctx->Line.StipplePattern;
/* GL stipple factor is in [1,256], remap to [0, 255] here */
raster->line_stipple_factor = ctx->Line.StippleFactor - 1;
/* _NEW_MULTISAMPLE */
raster->multisample = _mesa_is_multisample_enabled(ctx);
/* _NEW_MULTISAMPLE | _NEW_BUFFERS */
raster->force_persample_interp =
!st->force_persample_in_shader &&
- _mesa_is_multisample_enabled(ctx) &&
+ raster->multisample &&
ctx->Multisample.SampleShading &&
ctx->Multisample.MinSampleShadingValue *
_mesa_geometric_samples(ctx->DrawBuffer) > 1;
/* _NEW_SCISSOR */
raster->scissor = ctx->Scissor.EnableFlags;
/* _NEW_FRAG_CLAMP */
raster->clamp_fragment_color = !st->clamp_frag_color_in_shader &&
ctx->Color._ClampFragmentColor;
--
2.7.4
More information about the mesa-dev
mailing list