i965/vec4: Make with_writemask() non-static.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_sf.c
index b062c0b5a6b04205719b7d2c770cb17380ae66fd..163407878395e5cc0ba16f8ec0bd51cb4bce7c46 100644 (file)
@@ -81,6 +81,7 @@ static void compile_sf_prog( struct brw_context *brw,
 
    c.prog_data.urb_read_length = c.nr_attr_regs;
    c.prog_data.urb_entry_size = c.nr_setup_regs * 2;
+   c.has_flat_shading = brw_any_flat_varyings(&key->interpolation_mode);
 
    /* Which primitive?  Or all three? 
     */
@@ -193,7 +194,6 @@ brw_upload_sf_prog(struct brw_context *brw)
    key.interpolation_mode = brw->interpolation_mode;
 
    /* _NEW_LIGHT | _NEW_PROGRAM */
-   key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
    key.do_twoside_color = ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ||
                            ctx->VertexProgram._TwoSideEnabled);