draw: Cosmetic cleanups and comments.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 18 Apr 2010 07:45:54 +0000 (09:45 +0200)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 18 Apr 2010 08:36:28 +0000 (10:36 +0200)
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_pipe.c
src/gallium/auxiliary/draw/draw_pipe_vbuf.c
src/gallium/auxiliary/draw/draw_vertex.h

index b6574a9fea17c9ece1ee7d426ee60a634b5dd0c8..99f4e6dd2a8558c772e3c4e063f74d3302ace81d 100644 (file)
@@ -56,6 +56,12 @@ fail:
 
 boolean draw_init(struct draw_context *draw)
 {
+   /*
+    * Note that several functions compute the clipmask of the predefined
+    * formats with hardcoded formulas instead of using these. So modifications
+    * here must be reflected there too.
+    */
+
    ASSIGN_4V( draw->plane[0], -1,  0,  0, 1 );
    ASSIGN_4V( draw->plane[1],  1,  0,  0, 1 );
    ASSIGN_4V( draw->plane[2],  0, -1,  0, 1 );
index 83dc1a35f4cfd06b902bfc9857d96c04dd960e55..b8f57dde6d84ef96c2928e88b0d75414e19d7c3f 100644 (file)
@@ -225,7 +225,7 @@ static void do_triangle( struct draw_context *draw,
 
 
 /**
- * Code to run the pipeline on a fairly arbitary collection of vertices.
+ * Code to run the pipeline on a fairly arbitrary collection of vertices.
  * For drawing indexed primitives.
  *
  * Vertex headers must be pre-initialized with the
index 1c7db0005a95099a87044e164213e2a06d551ccf..ee2b8116032ad1c498a57ac77a1ac645b0d408d8 100644 (file)
@@ -235,7 +235,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
    for (i = 0; i < vbuf->vinfo->num_attribs; i++) {
       unsigned emit_sz = 0;
       unsigned src_buffer = 0;
-      unsigned output_format;
+      enum pipe_format output_format;
       unsigned src_offset = (vbuf->vinfo->attrib[i].src_index * 4 * sizeof(float) );
 
       output_format = draw_translate_vinfo_format(vbuf->vinfo->attrib[i].emit);
index ca272371267a957aab5f23dbd11892ca03c1515a..3af31ffe1264f3d129fedbc62dbd56ec9bbaa5ce 100644 (file)
@@ -142,7 +142,7 @@ void draw_dump_emitted_vertex(const struct vertex_info *vinfo,
                               const uint8_t *data);
 
 
-static INLINE unsigned draw_translate_vinfo_format(enum attrib_emit emit)
+static INLINE enum pipe_format draw_translate_vinfo_format(enum attrib_emit emit)
 {
    switch (emit) {
    case EMIT_OMIT:
@@ -166,7 +166,7 @@ static INLINE unsigned draw_translate_vinfo_format(enum attrib_emit emit)
    }
 }
 
-static INLINE unsigned draw_translate_vinfo_size(enum attrib_emit emit)
+static INLINE enum attrib_emit draw_translate_vinfo_size(enum attrib_emit emit)
 {
    switch (emit) {
    case EMIT_OMIT: