gallium: remove unnecessary guards on qs->next
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 10 Dec 2007 22:02:04 +0000 (22:02 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 10 Dec 2007 22:02:10 +0000 (22:02 +0000)
12 files changed:
src/mesa/pipe/softpipe/sp_quad_alpha_test.c
src/mesa/pipe/softpipe/sp_quad_blend.c
src/mesa/pipe/softpipe/sp_quad_bufloop.c
src/mesa/pipe/softpipe/sp_quad_colormask.c
src/mesa/pipe/softpipe/sp_quad_coverage.c
src/mesa/pipe/softpipe/sp_quad_depth_test.c
src/mesa/pipe/softpipe/sp_quad_earlyz.c
src/mesa/pipe/softpipe/sp_quad_fs.c
src/mesa/pipe/softpipe/sp_quad_occlusion.c
src/mesa/pipe/softpipe/sp_quad_output.c
src/mesa/pipe/softpipe/sp_quad_stencil.c
src/mesa/pipe/softpipe/sp_quad_stipple.c

index 7b56bce..d056abe 100644 (file)
@@ -84,8 +84,7 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void alpha_test_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index 1843e20..17f3ecd 100644 (file)
@@ -726,8 +726,7 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void blend_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index e704b40..2ae4e22 100644 (file)
@@ -43,8 +43,7 @@ cbuf_loop_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void cbuf_loop_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index 867cc07..1f09d90 100644 (file)
@@ -87,8 +87,7 @@ colormask_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void colormask_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index cca2b9f..b3d3fae 100644 (file)
@@ -65,8 +65,7 @@ coverage_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void coverage_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index 93ea119..1b8a296 100644 (file)
@@ -253,8 +253,7 @@ depth_test_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void depth_test_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index 89fab2d..3abd1f1 100644 (file)
@@ -56,18 +56,14 @@ earlyz_quad(
    quad->outputs.depth[2] = z0 + dzdy;
    quad->outputs.depth[3] = z0 + dzdx + dzdy;
 
-   if (qs->next) {
-      qs->next->run( qs->next, quad );
-   }
+   qs->next->run( qs->next, quad );
 }
 
 static void
 earlyz_begin(
    struct quad_stage *qs )
 {
-   if (qs->next) {
-      qs->next->begin( qs->next );
-   }
+   qs->next->begin( qs->next );
 }
 
 static void
index 1aba54d..75576a9 100644 (file)
@@ -304,8 +304,7 @@ static void shade_begin(struct quad_stage *qs)
       }
    }
 
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index 028d30c..d65fdbd 100644 (file)
@@ -52,15 +52,13 @@ occlusion_count_quad(struct quad_stage *qs, struct quad_header *quad)
    occ->count += (quad->mask >> 2) & 1;
    occ->count += (quad->mask >> 3) & 1;
 
-   if (quad->mask)
-      qs->next->run(qs->next, quad);
+   qs->next->run(qs->next, quad);
 }
 
 
 static void occlusion_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index bfd7baa..cfe8f11 100644 (file)
@@ -67,8 +67,7 @@ output_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void output_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   assert(qs->next == NULL);
 }
 
 
index b8c1992..3f3eca0 100644 (file)
@@ -334,8 +334,7 @@ stencil_test_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void stencil_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }
 
 
index fcbbf00..04d9598 100644 (file)
@@ -60,8 +60,7 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quad)
 
 static void stipple_begin(struct quad_stage *qs)
 {
-   if (qs->next)
-      qs->next->begin(qs->next);
+   qs->next->begin(qs->next);
 }