Add support for swizzle control on source operands.

This required restructuring to store source operands in a new structure rather
than being stored in instructions, as swizzle is align16-only and shares
storage with other fields for align1 mode.

These changes were not tested on real programs using swizzle.
This commit is contained in:
Eric Anholt
2006-08-28 22:11:18 -07:00
committed by Damien Lespiau
parent 2a0f135784
commit 6a88ada7e8
3 changed files with 224 additions and 90 deletions
+18
View File
@@ -239,6 +239,24 @@ int saved_state = INITIAL;
"signed" { return SIGNED; }
"scalar" { return SCALAR; }
/* channel selectors */
"x" {
yylval.integer = BRW_CHANNEL_X;
return X;
}
"y" {
yylval.integer = BRW_CHANNEL_Y;
return Y;
}
"z" {
yylval.integer = BRW_CHANNEL_Z;
return Z;
}
"w" {
yylval.integer = BRW_CHANNEL_W;
return W;
}
[0-9]* {
yylval.integer = atoi(yytext);
return INTEGER;