summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_setup.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-03 10:58:03 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-03 10:58:03 -0600
commita813f654872380547faf67fba75fa30792f87ea6 (patch)
treee8321016a49fe92f0304ec333c300799f7eb3e49 /src/mesa/state_tracker/st_atom_setup.c
parentea92566ed9cabf5eb5d0993b39c4372d5bfcf3f1 (diff)
clarify that line_stipple_factor is in [0,255] corresponding to GL's range of [1,256].
Diffstat (limited to 'src/mesa/state_tracker/st_atom_setup.c')
-rw-r--r--src/mesa/state_tracker/st_atom_setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_setup.c b/src/mesa/state_tracker/st_atom_setup.c
index 23adf0b7c8..457bfaa9ba 100644
--- a/src/mesa/state_tracker/st_atom_setup.c
+++ b/src/mesa/state_tracker/st_atom_setup.c
@@ -184,7 +184,8 @@ static void update_setup_state( struct st_context *st )
setup.line_smooth = ctx->Line.SmoothFlag;
setup.line_stipple_enable = ctx->Line.StippleFlag;
setup.line_stipple_pattern = ctx->Line.StipplePattern;
- setup.line_stipple_factor = ctx->Line.StippleFactor;
+ /* GL stipple factor is in [1,256], remap to [0, 255] here */
+ setup.line_stipple_factor = ctx->Line.StippleFactor - 1;
if (memcmp(&setup, &st->state.setup, sizeof(setup)) != 0) {