aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen8_sf_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-11-03 16:26:48 -0800
committerKenneth Graunke <[email protected]>2014-11-08 22:22:53 -0800
commit61838fd9ad9e5e878cbc39d3f37b2188b9ec8d11 (patch)
treee1c892a9651c4f43394cf7990195968833458ea8 /src/mesa/drivers/dri/i965/gen8_sf_state.c
parent87927ed1f0bd92d9b0d5fae213e5c9056304f007 (diff)
i965: Use ctx->Const.MaxLineWidth when clamping ctx->Line.Width.
Rather than hardcoding platform values in every code path, just use the maximum value we set. Currently, ctx->Const.LineWidth == 5, which is smaller than the hardware limit. But applications shouldn't be using a value larger than we support anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen8_sf_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_sf_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_sf_state.c b/src/mesa/drivers/dri/i965/gen8_sf_state.c
index 6aa7b4d50f3..6995a6a63f3 100644
--- a/src/mesa/drivers/dri/i965/gen8_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sf_state.c
@@ -149,7 +149,8 @@ upload_sf(struct brw_context *brw)
dw1 |= GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
/* _NEW_LINE */
- uint32_t line_width_u3_7 = U_FIXED(CLAMP(ctx->Line.Width, 0.0, 7.99), 7);
+ uint32_t line_width_u3_7 =
+ U_FIXED(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth), 7);
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
if (brw->gen >= 9 || brw->is_cherryview) {