i965: consolidate generation check
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 6 Jul 2016 03:14:37 +0000 (13:14 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 7 Jul 2016 02:29:21 +0000 (12:29 +1000)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/mesa/drivers/dri/i965/brw_vs.c

index cda95f81f1b2bf940534d79810d9a7a4dff9016b..30499e7b9f223b38d46278a3370be65a87b48dc6 100644 (file)
@@ -327,10 +327,15 @@ brw_vs_populate_key(struct brw_context *brw,
          _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1;
    }
 
-   /* _NEW_POLYGON */
    if (brw->gen < 6) {
+      /* _NEW_POLYGON */
       key->copy_edgeflag = (ctx->Polygon.FrontMode != GL_FILL ||
                             ctx->Polygon.BackMode != GL_FILL);
+
+      /* _NEW_POINT */
+      if (ctx->Point.PointSprite) {
+         key->point_coord_replace = ctx->Point.CoordReplace & 0xff;
+      }
    }
 
    if (prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
@@ -339,11 +344,6 @@ brw_vs_populate_key(struct brw_context *brw,
       key->clamp_vertex_color = ctx->Light._ClampVertexColor;
    }
 
-   /* _NEW_POINT */
-   if (brw->gen < 6 && ctx->Point.PointSprite) {
-      key->point_coord_replace = ctx->Point.CoordReplace & 0xff;
-   }
-
    /* _NEW_TEXTURE */
    brw_populate_sampler_prog_key_data(ctx, prog, &key->tex);