gallium: added new EMIT_HEADER token
authorBrian <brian.paul@tungstengraphics.com>
Thu, 13 Mar 2008 22:55:48 +0000 (16:55 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 13 Mar 2008 22:55:48 +0000 (16:55 -0600)
Used to emit the struct vertex_header info for softpipe.
Before we were using the EMIT_ALL token but that's insufficient for the
draw pass-through mode.  EMIT_ALL might get removed soon...

src/gallium/auxiliary/draw/draw_vertex.c
src/gallium/auxiliary/draw/draw_vertex.h

index daf1ef4b80fe3c8dc08f270c461e042bf70d00e3..970adc95e7490a350daba7c104179a6820977d29 100644 (file)
@@ -52,6 +52,9 @@ draw_compute_vertex_size(struct vertex_info *vinfo)
       switch (vinfo->emit[i]) {
       case EMIT_OMIT:
          break;
+      case EMIT_HEADER:
+         vinfo->size += sizeof(struct vertex_header) / 4;
+         break;
       case EMIT_4UB:
          /* fall-through */
       case EMIT_1F_PSIZE:
index 267c74203bd4fb2885f0fef42cf63ae8b10f31d3..abd2017ed33ec71d4bdcbc0dafb625dd4f489e62 100644 (file)
@@ -48,6 +48,7 @@
 enum attrib_emit {
    EMIT_OMIT,      /**< don't emit the attribute */
    EMIT_ALL,       /**< emit whole post-xform vertex, w/ header */
+   EMIT_HEADER,    /**< emit vertex_header struct (XXX temp?) */
    EMIT_1F,
    EMIT_1F_PSIZE,  /**< insert constant point size */
    EMIT_2F,