ctx->Const.MaxLineWidthAA = 40.0;
ctx->Const.LineWidthGranularity = 0.125;
} else if (brw->gen >= 6) {
- ctx->Const.MaxLineWidth = 7.875;
- ctx->Const.MaxLineWidthAA = 7.875;
+ ctx->Const.MaxLineWidth = 7.375;
+ ctx->Const.MaxLineWidthAA = 7.375;
ctx->Const.LineWidthGranularity = 0.125;
} else {
ctx->Const.MaxLineWidth = 7.0;
/* _NEW_LINE */
{
- uint32_t line_width_u3_7 =
- U_FIXED(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth), 7);
+ /* OpenGL dictates that line width should be rounded to the nearest
+ * integer
+ */
+ float line_width =
+ roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
+ uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
/* TODO: line width of 0 is not allowed when MSAA enabled */
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
/* _NEW_LINE */
{
- uint32_t line_width_u3_7 =
- U_FIXED(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth), 7);
+ /* OpenGL dictates that line width should be rounded to the nearest
+ * integer
+ */
+ float line_width =
+ roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
+ uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
/* TODO: line width of 0 is not allowed when MSAA enabled */
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
dw1 |= GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
/* _NEW_LINE */
- uint32_t line_width_u3_7 =
- U_FIXED(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth), 7);
+ /* OpenGL dictates that line width should be rounded to the nearest
+ * integer
+ */
+ float line_width =
+ roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
+ uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
if (brw->gen >= 9 || brw->is_cherryview) {