i965: Share min/max between brw_wm_emit.c and brw_wm_glsl.c
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs.c
index 8beb449bd5f3a427aada8beed5a6fe97d2885c1f..f0c79efbd964f96c17f7f2a5a0ba4eaf30cebb91 100644 (file)
@@ -85,21 +85,20 @@ static void do_vs_prog( struct brw_context *brw,
 
 static void brw_upload_vs_prog(struct brw_context *brw)
 {
+   GLcontext *ctx = &brw->intel.ctx;
    struct brw_vs_prog_key key;
    struct brw_vertex_program *vp = 
       (struct brw_vertex_program *)brw->vertex_program;
 
-   assert (vp && !vp->program.IsNVProgram);
-   
    memset(&key, 0, sizeof(key));
 
    /* Just upload the program verbatim for now.  Always send it all
     * the inputs it asks for, whether they are varying or not.
     */
    key.program_string_id = vp->id;
-   key.nr_userclip = brw_count_bits(brw->attribs.Transform->ClipPlanesEnabled);
-   key.copy_edgeflag = (brw->attribs.Polygon->FrontMode != GL_FILL ||
-                       brw->attribs.Polygon->BackMode != GL_FILL);
+   key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
+   key.copy_edgeflag = (ctx->Polygon.FrontMode != GL_FILL ||
+                       ctx->Polygon.BackMode != GL_FILL);
 
    /* Make an early check for the key.
     */