intel: Add a batch flush between front-buffer downsample and X protocol.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs.c
index 0a3924fddf40c20b8010a0af271faf475e80da17..43abd891358a706840fee4580503921f7e59d0ec 100644 (file)
@@ -234,8 +234,10 @@ do_vs_prog(struct brw_context *brw,
    } else {
       param_count = vp->program.Base.Parameters->NumParameters * 4;
    }
-   /* We also upload clip plane data as uniforms */
-   param_count += MAX_CLIP_PLANES * 4;
+   /* vec4_visitor::setup_uniform_clipplane_values() also uploads user clip
+    * planes as uniforms.
+    */
+   param_count += c.key.base.nr_userclip_plane_consts * 4;
 
    prog_data.base.param = rzalloc_array(NULL, const float *, param_count);
    prog_data.base.pull_param = rzalloc_array(NULL, const float *, param_count);
@@ -479,12 +481,18 @@ static void brw_upload_vs_prog(struct brw_context *brw)
                         &brw->vs.prog_offset, &brw->vs.prog_data)) {
       bool success = do_vs_prog(brw, ctx->Shader.CurrentVertexProgram,
                                vp, &key);
-
+      (void) success;
       assert(success);
    }
    if (memcmp(&brw->vs.prog_data->base.vue_map, &brw->vue_map_geom_out,
               sizeof(brw->vue_map_geom_out)) != 0) {
-      brw->vue_map_geom_out = brw->vs.prog_data->base.vue_map;
+      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;
    }
 }