struct tgsi_header *header;
unsigned processor : 4;
int implied_array_size : 5;
+ unsigned num_immediates;
};
static void report_error( struct translate_ctx *ctx, const char *msg )
uint advance;
int type;
+ if (*ctx->cur == '[') {
+ uint uindex;
+
+ ++ctx->cur;
+
+ eat_opt_white( &ctx->cur );
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+
+ if (uindex != ctx->num_immediates) {
+ report_error( ctx, "Immediates must be sorted" );
+ return FALSE;
+ }
+
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+
+ ctx->cur++;
+ }
+
if (!eat_white( &ctx->cur )) {
report_error( ctx, "Syntax error" );
return FALSE;
return FALSE;
ctx->tokens_cur += advance;
+ ctx->num_immediates++;
+
return TRUE;
}
DCL TEMP[0]
-IMM FLT32 { 1.0, 0.0, 0.0, 0.0 }
-IMM FLT32 { 1.5, 0.0, 0.0, 0.0 }
+IMM[0] FLT32 { 1.0, 0.0, 0.0, 0.0 }
+IMM[1] FLT32 { 1.5, 0.0, 0.0, 0.0 }
ADD TEMP[0], IN[0], IMM[0]
RCP TEMP[0].x, TEMP[0].xxxx