i965: Drop trailing whitespace from the rest of the driver.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_clip_unfilled.c
index 644c99aebf11791816be5e4bbb31c1529924f16f..f6c5fc00013b6523e4ab6dc042854fa47a864fef 100644 (file)
@@ -2,7 +2,7 @@
  Copyright (C) Intel Corp.  2006.  All Rights Reserved.
  Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
  develop this 3D driver.
+
  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  distribute, sublicense, and/or sell copies of the Software, and to
  permit persons to whom the Software is furnished to do so, subject to
  the following conditions:
+
  The above copyright notice and this permission notice (including the
  next paragraph) shall be included in all copies or substantial
  portions of the Software.
+
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
  **********************************************************************/
  /*
   * Authors:
@@ -80,8 +80,8 @@ static void compute_tri_direction( struct brw_clip_compile *c )
 
    /* Calculate the vectors of two edges of the triangle:
     */
-   brw_ADD(p, e, v0n, negate(v2n)); 
-   brw_ADD(p, f, v1n, negate(v2n)); 
+   brw_ADD(p, e, v0n, negate(v2n));
+   brw_ADD(p, f, v1n, negate(v2n));
 
    /* Take their crossproduct:
     */
@@ -112,7 +112,7 @@ static void cull_direction( struct brw_clip_compile *c )
           conditional,
           get_element(c->reg.dir, 2),
           brw_imm_f(0));
-   
+
    brw_IF(p, BRW_EXECUTE_1);
    {
       brw_clip_kill_thread(c);
@@ -127,7 +127,7 @@ static void copy_bfc( struct brw_clip_compile *c )
    struct brw_compile *p = &c->func;
    GLuint conditional;
 
-   /* Do we have any colors to copy? 
+   /* Do we have any colors to copy?
     */
    if (!(brw_clip_have_varying(c, VARYING_SLOT_COL0) &&
          brw_clip_have_varying(c, VARYING_SLOT_BFC0)) &&
@@ -149,7 +149,7 @@ static void copy_bfc( struct brw_clip_compile *c )
           conditional,
           get_element(c->reg.dir, 2),
           brw_imm_f(0));
-   
+
    brw_IF(p, BRW_EXECUTE_1);
    {
       GLuint i;
@@ -157,7 +157,7 @@ static void copy_bfc( struct brw_clip_compile *c )
       for (i = 0; i < 3; i++) {
         if (brw_clip_have_varying(c, VARYING_SLOT_COL0) &&
              brw_clip_have_varying(c, VARYING_SLOT_BFC0))
-           brw_MOV(p, 
+           brw_MOV(p,
                    byte_offset(c->reg.vertex[i],
                                 brw_varying_to_offset(&c->vue_map,
                                                       VARYING_SLOT_COL0)),
@@ -167,7 +167,7 @@ static void copy_bfc( struct brw_clip_compile *c )
 
         if (brw_clip_have_varying(c, VARYING_SLOT_COL1) &&
              brw_clip_have_varying(c, VARYING_SLOT_BFC1))
-           brw_MOV(p, 
+           brw_MOV(p,
                    byte_offset(c->reg.vertex[i],
                                 brw_varying_to_offset(&c->vue_map,
                                                       VARYING_SLOT_COL1)),
@@ -195,14 +195,14 @@ static void compute_offset( struct brw_clip_compile *c )
    struct brw_compile *p = &c->func;
    struct brw_reg off = c->reg.offset;
    struct brw_reg dir = c->reg.dir;
-   
+
    brw_math_invert(p, get_element(off, 2), get_element(dir, 2));
    brw_MUL(p, vec2(off), dir, get_element(off, 2));
 
-   brw_CMP(p, 
-          vec1(brw_null_reg()), 
+   brw_CMP(p,
+          vec1(brw_null_reg()),
           BRW_CONDITIONAL_GE,
-          brw_abs(get_element(off, 0)), 
+          brw_abs(get_element(off, 0)),
           brw_abs(get_element(off, 1)));
 
    brw_SEL(p, vec1(off), brw_abs(get_element(off, 0)), brw_abs(get_element(off, 1)));
@@ -218,10 +218,10 @@ static void merge_edgeflags( struct brw_clip_compile *c )
    struct brw_compile *p = &c->func;
    struct brw_reg tmp0 = get_element_ud(c->reg.tmp0, 0);
 
-   brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK)); 
-   brw_CMP(p, 
-          vec1(brw_null_reg()), 
-          BRW_CONDITIONAL_EQ, 
+   brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
+   brw_CMP(p,
+          vec1(brw_null_reg()),
+          BRW_CONDITIONAL_EQ,
           tmp0,
           brw_imm_ud(_3DPRIM_POLYGON));
 
@@ -229,7 +229,7 @@ static void merge_edgeflags( struct brw_clip_compile *c )
     * a _3DPRIM_TRISTRIP_REVERSE:
     */
    brw_IF(p, BRW_EXECUTE_1);
-   {   
+   {
       brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ);
       brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<8));
       brw_MOV(p, byte_offset(c->reg.vertex[0],
@@ -287,9 +287,9 @@ static void emit_lines(struct brw_clip_compile *c,
       {
         brw_MOV(p, get_addr_reg(v0), deref_1uw(v0ptr, 0));
         brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
-           
+       
         apply_one_offset(c, v0);
-           
+       
         brw_set_conditionalmod(p, BRW_CONDITIONAL_G);
         brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
       }
@@ -312,8 +312,8 @@ static void emit_lines(struct brw_clip_compile *c,
       brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
 
       /* draw edge if edgeflag != 0 */
-      brw_CMP(p, 
-             vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, 
+      brw_CMP(p,
+             vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
              deref_1f(v0, brw_varying_to_offset(&c->vue_map,
                                                  VARYING_SLOT_EDGE)),
              brw_imm_f(0));
@@ -352,10 +352,10 @@ static void emit_points(struct brw_clip_compile *c,
       brw_MOV(p, get_addr_reg(v0), deref_1uw(v0ptr, 0));
       brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
 
-      /* draw if edgeflag != 0 
+      /* draw if edgeflag != 0
        */
-      brw_CMP(p, 
-             vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, 
+      brw_CMP(p,
+             vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
              deref_1f(v0, brw_varying_to_offset(&c->vue_map,
                                                  VARYING_SLOT_EDGE)),
              brw_imm_f(0));
@@ -383,7 +383,7 @@ static void emit_points(struct brw_clip_compile *c,
 
 
 static void emit_primitives( struct brw_clip_compile *c,
-                            GLuint mode, 
+                            GLuint mode,
                             bool do_offset )
 {
    switch (mode) {
@@ -403,7 +403,7 @@ static void emit_primitives( struct brw_clip_compile *c,
       assert(0);
       break;
    }
-} 
+}
 
 
 
@@ -422,7 +422,7 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c )
              BRW_CONDITIONAL_GE,
              get_element(c->reg.dir, 2),
              brw_imm_f(0));
-   
+
       brw_IF(p, BRW_EXECUTE_1);
       {
         emit_primitives(c, c->key.fill_ccw, c->key.offset_ccw);
@@ -436,7 +436,7 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c )
    else if (c->key.fill_cw != CLIP_CULL) {
       emit_primitives(c, c->key.fill_cw, c->key.offset_cw);
    }
-   else if (c->key.fill_ccw != CLIP_CULL) { 
+   else if (c->key.fill_ccw != CLIP_CULL) {
       emit_primitives(c, c->key.fill_ccw, c->key.offset_ccw);
    }
 }
@@ -448,7 +448,7 @@ static void check_nr_verts( struct brw_clip_compile *c )
 {
    struct brw_compile *p = &c->func;
 
-   brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.nr_verts, brw_imm_d(3));      
+   brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.nr_verts, brw_imm_d(3));
    brw_IF(p, BRW_EXECUTE_1);
    {
       brw_clip_kill_thread(c);
@@ -482,11 +482,11 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
 
    merge_edgeflags(c);
 
-   /* Need to use the inlist indirection here: 
+   /* Need to use the inlist indirection here:
     */
-   if (c->need_direction) 
+   if (c->need_direction)
       compute_tri_direction(c);
-   
+
    if (c->key.fill_ccw == CLIP_CULL ||
        c->key.fill_cw == CLIP_CULL)
       cull_direction(c);
@@ -503,7 +503,7 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
     */
    if (c->has_flat_shading)
       brw_clip_tri_flat_shade(c);
-   
+
    brw_clip_init_clipmask(c);
    brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, c->reg.planemask, brw_imm_ud(0));
    brw_IF(p, BRW_EXECUTE_1);