mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
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 a2c105e31e)
This commit is contained in:
parent
1505ce833a
commit
f64664de7f
1 changed files with 3 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue