mesa: add/update comments in _mesa_copy_buffer_subdata()
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs_constval.c
index 67af23ec4396740b459e72ac207cdf240cb67b80..9ce5ab379ea3bedc6043b505aa5ac2ab60847d02 100644 (file)
@@ -38,7 +38,7 @@
  * are promoted to [0,0,0,1] for the purposes of this analysis.
  */
 struct tracker {
-   GLboolean twoside;
+   bool twoside;
    GLubyte active[PROGRAM_OUTPUT+1][MAX_PROGRAM_TEMPS];
    GLbitfield size_masks[4];  /**< one bit per fragment program input attrib */
 };
@@ -197,12 +197,12 @@ static void calc_wm_input_sizes( struct brw_context *brw )
 
    memset(&t, 0, sizeof(t));
 
-   /* _NEW_LIGHT */
-   if (ctx->Light.Model.TwoSide)
+   /* _NEW_LIGHT | _NEW_PROGRAM */
+   if (ctx->VertexProgram._TwoSideEnabled)
       t.twoside = 1;
 
    for (i = 0; i < VERT_ATTRIB_MAX; i++) 
-      if (vp->program.Base.InputsRead & (1<<i))
+      if (vp->program.Base.InputsRead & BITFIELD64_BIT(i))
         set_active_component(&t, PROGRAM_INPUT, i, 
                              szflag[get_input_size(brw, i)]);
       
@@ -233,10 +233,10 @@ static void calc_wm_input_sizes( struct brw_context *brw )
 
 const struct brw_tracked_state brw_wm_input_sizes = {
    .dirty = {
-      .mesa  = _NEW_LIGHT,
+      .mesa  = _NEW_LIGHT | _NEW_PROGRAM,
       .brw   = BRW_NEW_VERTEX_PROGRAM | BRW_NEW_INPUT_DIMENSIONS,
       .cache = 0
    },
-   .prepare = calc_wm_input_sizes
+   .emit = calc_wm_input_sizes
 };