st/mesa: minor simplification of some state atom assignments
authorBrian Paul <brianp@vmware.com>
Thu, 3 Jul 2014 18:02:16 +0000 (12:02 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 9 Jul 2014 12:43:25 +0000 (06:43 -0600)
src/mesa/state_tracker/st_atom_blend.c
src/mesa/state_tracker/st_atom_rasterizer.c

index 50d240a7b217824c233a28cc5634b6948b8536c2..064e0c14f1f195f1808109887b74e849775e3fa8 100644 (file)
@@ -263,16 +263,13 @@ update_blend( struct st_context *st )
          blend->rt[i].colormask |= PIPE_MASK_A;
    }
 
-   if (ctx->Color.DitherFlag)
-      blend->dither = 1;
+   blend->dither = ctx->Color.DitherFlag;
 
    if (ctx->Multisample.Enabled) {
       /* unlike in gallium/d3d10 these operations are only performed
          if msaa is enabled */
-      if (ctx->Multisample.SampleAlphaToCoverage)
-         blend->alpha_to_coverage = 1;
-      if (ctx->Multisample.SampleAlphaToOne)
-         blend->alpha_to_one = 1;
+      blend->alpha_to_coverage = ctx->Multisample.SampleAlphaToCoverage;
+      blend->alpha_to_one = ctx->Multisample.SampleAlphaToOne;
    }
 
    cso_set_blend(st->cso_context, blend);
index ee5e9e5743b038270e9bc7372355fea7577d337d..2bad6433487551ed0e6f50b92eebc3b559c011b0 100644 (file)
@@ -245,7 +245,7 @@ static void update_raster_state( struct st_context *st )
    }
 
    /* _NEW_TRANSFORM */
-   raster->depth_clip = ctx->Transform.DepthClamp == GL_FALSE;
+   raster->depth_clip = !ctx->Transform.DepthClamp;
    raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled;
 
    cso_set_rasterizer(st->cso_context, raster);