aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sf_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/gen8_sf_state.c3
4 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index 7f31bc163a1..2fecd1eaeb3 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -213,8 +213,8 @@ static void upload_sf_unit( struct brw_context *brw )
}
/* _NEW_LINE */
- /* XXX use ctx->Const.Min/MaxLineWidth here */
- sf->sf6.line_width = CLAMP(ctx->Line.Width, 1.0, 5.0) * (1<<1);
+ sf->sf6.line_width =
+ CLAMP(ctx->Line.Width, 1.0, ctx->Const.MaxLineWidth) * (1<<1);
sf->sf6.line_endcap_aa_region_width = 1;
if (ctx->Line.SmoothFlag)
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index d0411b08cc0..24d27546cd8 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -322,7 +322,8 @@ upload_sf_state(struct brw_context *brw)
/* _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);
/* TODO: line width of 0 is not allowed when MSAA enabled */
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c
index 150a4d38162..109b825de19 100644
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c
@@ -190,7 +190,8 @@ upload_sf_state(struct brw_context *brw)
/* _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);
/* TODO: line width of 0 is not allowed when MSAA enabled */
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
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) {