Fixed DCL usage index parsing.
"dcl_texcoord_pp" is valid, so we need to see if there's a '_' in there where
we expect a number might be before parsing for an index value.
--- a/mojoshader_assembler.c Thu Feb 12 01:58:14 2009 -0500
+++ b/mojoshader_assembler.c Thu Feb 12 02:03:18 2009 -0500
@@ -1132,8 +1132,11 @@
if (parse_dcl_usage(ctx, &usage, &issampler))
{
- if ( (ctx->tokenlen > 0) && (!ui32fromtoken(ctx, &index)) )
- fail(ctx, "Expected usage index");
+ if ((ctx->tokenlen > 0) && (*ctx->token != '_'))
+ {
+ if (!ui32fromtoken(ctx, &index))
+ fail(ctx, "Expected usage index");
+ } // if
} // if
parse_destination_token(ctx);