summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-21 13:08:21 -0700
committerBrian Paul <brianp@vmware.com>2010-01-22 08:08:45 -0700
commit5023a7f53f4b11cdea1ed90d7e856b6eda6dd68e (patch)
treea4e2343a8fce8952c4c8d6d309e8f3852945a6f1 /src/gallium/auxiliary/draw
parent3c31b1b6d15dc5424babd5b4b54cd380d88be84a (diff)
gallium/draw: fix-up comments, whitespace
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_cull.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_cull.c b/src/gallium/auxiliary/draw/draw_pipe_cull.c
index 11b39db599..dc66c65a56 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_cull.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_cull.c
@@ -50,8 +50,6 @@ static INLINE struct cull_stage *cull_stage( struct draw_stage *stage )
}
-
-
static void cull_tri( struct draw_stage *stage,
struct prim_header *header )
{
@@ -62,7 +60,7 @@ static void cull_tri( struct draw_stage *stage,
const float *v1 = header->v[1]->data[pos];
const float *v2 = header->v[2]->data[pos];
- /* edge vectors e = v0 - v2, f = v1 - v2 */
+ /* edge vectors: e = v0 - v2, f = v1 - v2 */
const float ex = v0[0] - v2[0];
const float ey = v0[1] - v2[1];
const float fx = v1[0] - v2[0];
@@ -72,7 +70,7 @@ static void cull_tri( struct draw_stage *stage,
header->det = ex * fy - ey * fx;
if (header->det != 0) {
- /* if (det < 0 then Z points toward camera and triangle is
+ /* if det < 0 then Z points toward the camera and the triangle is
* counter-clockwise winding.
*/
unsigned winding = (header->det < 0) ? PIPE_WINDING_CCW : PIPE_WINDING_CW;
@@ -84,6 +82,7 @@ static void cull_tri( struct draw_stage *stage,
}
}
+
static void cull_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
@@ -96,13 +95,13 @@ static void cull_first_tri( struct draw_stage *stage,
}
-
static void cull_flush( struct draw_stage *stage, unsigned flags )
{
stage->tri = cull_first_tri;
stage->next->flush( stage->next, flags );
}
+
static void cull_reset_stipple_counter( struct draw_stage *stage )
{
stage->next->reset_stipple_counter( stage->next );
@@ -140,7 +139,7 @@ struct draw_stage *draw_cull_stage( struct draw_context *draw )
return &cull->stage;
- fail:
+fail:
if (cull)
cull->stage.destroy( &cull->stage );