diff options
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_rasterizer.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_rasterizer.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c index f20df9e9b..0e2a152cd 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c @@ -84,11 +84,10 @@ static void update_raster_state( struct st_context *st ) /* _NEW_LIGHT */ - if (ctx->Light.ShadeModel == GL_FLAT) - raster->flatshade = 1; - - if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION_EXT) - raster->flatshade_first = 1; + raster->flatshade = ctx->Light.ShadeModel == GL_FLAT; + + raster->flatshade_first = ctx->Light.ProvokingVertex == + GL_FIRST_VERTEX_CONVENTION_EXT; /* _NEW_LIGHT | _NEW_PROGRAM */ raster->light_twoside = ctx->VertexProgram._TwoSideEnabled; @@ -135,32 +134,23 @@ static void update_raster_state( struct st_context *st ) /* _NEW_POLYGON */ - if (ctx->Polygon.OffsetUnits != 0.0 || - ctx->Polygon.OffsetFactor != 0.0) { - raster->offset_point = ctx->Polygon.OffsetPoint; - raster->offset_line = ctx->Polygon.OffsetLine; - raster->offset_tri = ctx->Polygon.OffsetFill; - } - if (ctx->Polygon.OffsetPoint || ctx->Polygon.OffsetLine || ctx->Polygon.OffsetFill) { + raster->offset_point = ctx->Polygon.OffsetPoint; + raster->offset_line = ctx->Polygon.OffsetLine; + raster->offset_tri = ctx->Polygon.OffsetFill; raster->offset_units = ctx->Polygon.OffsetUnits; raster->offset_scale = ctx->Polygon.OffsetFactor; } - if (ctx->Polygon.SmoothFlag) - raster->poly_smooth = 1; - - if (ctx->Polygon.StippleFlag) - raster->poly_stipple_enable = 1; + raster->poly_smooth = ctx->Polygon.SmoothFlag; + raster->poly_stipple_enable = ctx->Polygon.StippleFlag; /* _NEW_POINT */ raster->point_size = ctx->Point.Size; - - if (!ctx->Point.PointSprite && ctx->Point.SmoothFlag) - raster->point_smooth = 1; + raster->point_smooth = !ctx->Point.PointSprite && ctx->Point.SmoothFlag; /* _NEW_POINT | _NEW_PROGRAM */ @@ -233,8 +223,7 @@ static void update_raster_state( struct st_context *st ) raster->multisample = ctx->Multisample._Enabled; /* _NEW_SCISSOR */ - if (ctx->Scissor.Enabled) - raster->scissor = 1; + raster->scissor = ctx->Scissor.Enabled; /* _NEW_FRAG_CLAMP */ raster->clamp_fragment_color = !st->clamp_frag_color_in_shader && |