summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-02-21 08:16:16 -0700
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 12:43:18 +0200
commite4e2bba8f433ae67f2fed221e8068d7c51684f04 (patch)
treeebbc8ec8afb2d0d7e454adcea47e0d4388339fd1
parent9001b970fb3e4b7c74318c9fe6357b61fc37dbba (diff)
st/mesa: fix polygon offset state translation logic
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 <jfonseca@vmware.com> (cherry picked from commit a2c105e31e47779ce1ddd80c62fc436292e40436)
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c10
1 files 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;
}