[Mesa-dev] [PATCH 1/4] st/mesa: fix polygon offset state translation bug
Brian Paul
brianp at vmware.com
Thu Feb 21 07:39:13 PST 2013
The conditionals were testing the wrong state. Just get rid of the
conditionals since they really don't buy us anything.
Note: This is a candidate for the stable branches.
---
src/mesa/state_tracker/st_atom_rasterizer.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index f20df9e..34bc9c9 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -135,19 +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;
- }
+ raster->offset_units = ctx->Polygon.OffsetUnits;
+ raster->offset_scale = ctx->Polygon.OffsetFactor;
- if (ctx->Polygon.OffsetPoint ||
- ctx->Polygon.OffsetLine ||
- ctx->Polygon.OffsetFill) {
- raster->offset_units = ctx->Polygon.OffsetUnits;
- raster->offset_scale = ctx->Polygon.OffsetFactor;
- }
+ raster->offset_point = ctx->Polygon.OffsetPoint;
+ raster->offset_line = ctx->Polygon.OffsetLine;
+ raster->offset_tri = ctx->Polygon.OffsetFill;
if (ctx->Polygon.SmoothFlag)
raster->poly_smooth = 1;
--
1.7.3.4
More information about the mesa-dev
mailing list