svga: Handle comment tokens when dumping.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 15 Nov 2009 20:14:03 +0000 (12:14 -0800)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 27 Nov 2009 13:34:13 +0000 (13:34 +0000)
src/gallium/drivers/svga/svgadump/svga_shader.h
src/gallium/drivers/svga/svgadump/svga_shader_dump.c

index 2fc1796a9041a5faaa53461c4543235635dba3d3..9217af2dd99fc09d63bbbd63e25543d4b4647863 100644 (file)
@@ -211,4 +211,10 @@ struct sh_trinaryop
    struct sh_srcreg src2;
 };
 
+struct sh_comment
+{
+   unsigned opcode:16;
+   unsigned size:16;
+};
+
 #endif /* ST_SHADER_SVGA_H */
index 7718bdf757b2a66028e7c1a629ab7c282cbbe952..b0e7fdf378a03ca45e03950106435c7b7615c467 100644 (file)
@@ -587,7 +587,12 @@ svga_shader_dump(
          break;
 
       case SVGA3DOP_COMMENT:
-         assert( 0 );
+         {
+            struct sh_comment comment = *(struct sh_comment *)assem;
+
+            /* Ignore comment contents. */
+            assem += sizeof(struct sh_comment) / sizeof(unsigned) + comment.size;
+         }
          break;
 
       case SVGA3DOP_RET: