Whoops, these bits are the token count minus the instruction token.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 Dec 2008 03:55:06 -0500
changeset 485 1cf40e016918
parent 484 dfce8e965115
child 486 45efac751027
Whoops, these bits are the token count minus the instruction token.
mojoshader_assembler.c
--- a/mojoshader_assembler.c	Wed Dec 10 03:54:41 2008 -0500
+++ b/mojoshader_assembler.c	Wed Dec 10 03:55:06 2008 -0500
@@ -1332,7 +1332,7 @@
         return FAIL;
 
     // insttoks bits are reserved and should be zero if < SM2.
-    const uint32 insttoks = shader_version_atleast(ctx, 2, 0) ? tokcount : 0;
+    const uint32 insttoks = shader_version_atleast(ctx, 2, 0) ? tokcount-1 : 0;
 
     // write out the instruction token.
     output_token(ctx, ((opcode & 0xFFFF) << 0) |