i965/vec4: Make with_writemask() non-static.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs.c
index 364a77a39539388e5794a384342ea28b8ac0c67d..7c7493f96325e3eb15267af1d4510d5d560c1df4 100644 (file)
@@ -64,6 +64,11 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map,
    vue_map->slots_valid = slots_valid;
    int i;
 
+   /* gl_Layer doesn't get its own varying slot--it's stored in the virst VUE
+    * slot (VARYING_SLOT_PSIZ).
+    */
+   slots_valid &= ~VARYING_BIT_LAYER;
+
    /* Make sure that the values we store in vue_map->varying_to_slot and
     * vue_map->slot_to_varying won't overflow the signed chars that are used
     * to store them.  Note that since vue_map->slot_to_varying sometimes holds
@@ -488,12 +493,13 @@ static void brw_upload_vs_prog(struct brw_context *brw)
               sizeof(brw->vue_map_geom_out)) != 0) {
       brw->vue_map_vs = brw->vs.prog_data->base.vue_map;
       brw->state.dirty.brw |= BRW_NEW_VUE_MAP_VS;
-
-      /* No geometry shader support yet, so the VS VUE map is the VUE map for
-       * the output of the "geometry" portion of the pipeline.
-       */
-      brw->vue_map_geom_out = brw->vue_map_vs;
-      brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
+      if (brw->gen < 7) {
+         /* No geometry shader support, so the VS VUE map is the VUE map for
+          * the output of the "geometry" portion of the pipeline.
+          */
+         brw->vue_map_geom_out = brw->vue_map_vs;
+         brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
+      }
    }
 }