From e4e2bba8f433ae67f2fed221e8068d7c51684f04 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 21 Feb 2013 08:16:16 -0700 Subject: st/mesa: fix polygon offset state translation logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old logic was kind of twisted, but seemed to work in practice. Note: This is a candidate for the stable branches. Reviewed-by: José Fonseca (cherry picked from commit a2c105e31e47779ce1ddd80c62fc436292e40436) --- src/mesa/state_tracker/st_atom_rasterizer.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index d9e9d21f68..e3f0452ebe 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -135,16 +135,12 @@ 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; } -- cgit v1.2.3