draw: Fix assertion failure at fetch_emit_prepare
authorMike Kaplinksiy <mike.kaplinskiy@gmail.com>
Thu, 28 May 2009 05:20:37 +0000 (01:20 -0400)
committerJakob Bornecrantz <wallbraker@gmail.com>
Thu, 28 May 2009 05:53:59 +0000 (22:53 -0700)
src/gallium/auxiliary/draw/draw_pt_fetch_emit.c

index 6b7d02a19bc031843bf5734874abf1cffc7d8bb9..e7fe6b3b7687af024f8112b6dfc0b025320de0ea 100644 (file)
@@ -130,6 +130,10 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
       unsigned output_format;
 
       switch (vinfo->attrib[i].emit) {
+      case EMIT_4UB:
+        output_format = PIPE_FORMAT_R8G8B8A8_UNORM;
+        emit_sz = 4 * sizeof(unsigned char);
+         break;
       case EMIT_4F:
         output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
         emit_sz = 4 * sizeof(float);
@@ -153,6 +157,8 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
         output_format = PIPE_FORMAT_R32_FLOAT;
         emit_sz = 1 * sizeof(float);
          break;
+      case EMIT_OMIT:
+         continue;
       default:
          assert(0);
         output_format = PIPE_FORMAT_NONE;