llvmpipe: reformatting, remove trailing whitespace, etc
authorBrian Paul <brianp@vmware.com>
Mon, 20 Sep 2010 19:07:59 +0000 (13:07 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 20 Sep 2010 19:18:41 +0000 (13:18 -0600)
src/gallium/drivers/llvmpipe/lp_setup_point.c

index 553898715185240e99b9e95d0958fc7328537226..5521cbbe876f6dc6fb9c2e51bbbbe91206c044fb 100644 (file)
@@ -52,26 +52,29 @@ struct point_info {
 /**
  * Compute a0 for a constant-valued coefficient (GL_FLAT shading).
  */
-static void constant_coef( struct lp_setup_context *setup,
-                           struct lp_rast_triangle *point,
-                           unsigned slot,
-                           const float value,
-                           unsigned i )
+static void
+constant_coef(struct lp_setup_context *setup,
+              struct lp_rast_triangle *point,
+              unsigned slot,
+              const float value,
+              unsigned i)
 {
    point->inputs.a0[slot][i] = value;
    point->inputs.dadx[slot][i] = 0.0f;
    point->inputs.dady[slot][i] = 0.0f;
 }
 
-static void perspective_coef( struct lp_setup_context *setup,
-                              struct lp_rast_triangle *point,
-                              const struct point_info *info,
-                              unsigned slot,
-                              unsigned vert_attr,
-                              unsigned i)
+
+static void
+perspective_coef(struct lp_setup_context *setup,
+                 struct lp_rast_triangle *point,
+                 const struct point_info *info,
+                 unsigned slot,
+                 unsigned vert_attr,
+                 unsigned i)
 {
-   if (i == 0) {   
-      float dadx = FIXED_ONE / (float)info->dx12;  
+   if (i == 0) {
+      float dadx = FIXED_ONE / (float)info->dx12;
       float dady =  0.0f;
       point->inputs.dadx[slot][i] = dadx;
       point->inputs.dady[slot][i] = dady;
@@ -79,30 +82,26 @@ static void perspective_coef( struct lp_setup_context *setup,
                                   (dadx * ((float)info->v0[0][0] - setup->pixel_offset) +
                                    dady * ((float)info->v0[0][1] - setup->pixel_offset)));
    }
-
    else if (i == 1) {
-      float dadx =  0.0f; 
+      float dadx =  0.0f;
       float dady =  FIXED_ONE / (float)info->dx12;
-   
+
       point->inputs.dadx[slot][i] = dadx;
       point->inputs.dady[slot][i] = dady;
       point->inputs.a0[slot][i] = (0.5 -
                                   (dadx * ((float)info->v0[0][0] - setup->pixel_offset) +
                                    dady * ((float)info->v0[0][1] - setup->pixel_offset)));
    }
-
    else if (i == 2) {
       point->inputs.a0[slot][i] = 0.0f;
       point->inputs.dadx[slot][i] = 0.0f;
       point->inputs.dady[slot][i] = 0.0f;
    }
-      
    else if (i == 3) {
       point->inputs.a0[slot][i] = 1.0f;
       point->inputs.dadx[slot][i] = 0.0f;
       point->inputs.dady[slot][i] = 0.0f;
    }
-
 }
 
 
@@ -144,6 +143,7 @@ setup_point_fragcoord_coef(struct lp_setup_context *setup,
    }
 }
 
+
 /**
  * Compute the point->coef[] array dadx, dady, a0 values.
  */
@@ -203,6 +203,7 @@ setup_point_coefficients( struct lp_setup_context *setup,
                               fragcoord_usage_mask);
 }
 
+
 static INLINE int
 subpixel_snap(float a)
 {
@@ -322,8 +323,9 @@ try_setup_point( struct lp_setup_context *setup,
 }
 
 
-static void lp_setup_point( struct lp_setup_context *setup,
-                           const float (*v0)[4] )
+static void 
+lp_setup_point(struct lp_setup_context *setup,
+               const float (*v0)[4])
 {
    if (!try_setup_point( setup, v0 ))
    {