diff options
author | Michal Krol <michal@vmware.com> | 2009-04-03 14:54:20 +0200 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-04-03 14:59:22 +0200 |
commit | cc770e0a0cbb2c0ff4327ffb0bf20f52ccc218cc (patch) | |
tree | 07f90f35f3664e30be330e2f353a88a07e9da294 /src/gallium/auxiliary/tgsi | |
parent | f7039fde4f9e1175c3dae534e5b91e22e693124a (diff) |
tgsi/text: Allow `-|src|` variant of `-(|src|)`.
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index fdaee9b060..bb1c7dc6cc 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -562,6 +562,7 @@ parse_src_operand( uint ind_file; int ind_index; uint swizzle[4]; + boolean parsed_ext_negate_paren = FALSE; boolean parsed_swizzle; boolean parsed_extswizzle; @@ -574,10 +575,17 @@ parse_src_operand( src->SrcRegisterExtMod.Negate = 1; eat_opt_white( &cur ); ctx->cur = cur; + parsed_ext_negate_paren = TRUE; + } + else if (*cur == '|') { + cur++; + src->SrcRegisterExtMod.Negate = 1; + src->SrcRegisterExtMod.Absolute = 1; + eat_opt_white(&cur); + ctx->cur = cur; } } - - if (*ctx->cur == '|') { + else if (*ctx->cur == '|') { ctx->cur++; eat_opt_white( &ctx->cur ); src->SrcRegisterExtMod.Absolute = 1; @@ -715,7 +723,7 @@ parse_src_operand( ctx->cur++; } - if (src->SrcRegisterExtMod.Negate) { + if (parsed_ext_negate_paren) { eat_opt_white( &ctx->cur ); if (*ctx->cur != ')') { report_error( ctx, "Expected `)'" ); |