diff options
author | Christian König <[email protected]> | 2013-03-07 15:02:31 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2013-03-19 13:38:32 +0100 |
commit | 21190fbd56ec2f12dc5a1bf1d9fc32d507e8f0a3 (patch) | |
tree | 9e871eed177a4ac7143946efbe69b2f5ec48ffe3 /src/gallium/auxiliary/tgsi/tgsi_parse.c | |
parent | 16caeff2a5cc1237d30de9487b48b1cd775d9ae1 (diff) |
tgsi: use separate structure for indirect address v2
To further improve the optimization of source and destination
indirect addressing we need the ability to store a reference
to the declaration of the addressed operands.
Since most of the fields in tgsi_src_register doesn't apply for
an indirect addressing operand replace it with a separate
tgsi_ind_register structure and so make room for extra information.
v2: rename Declaration to ArrayID, put the ArrayID into () instead of []
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_parse.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_parse.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c index 29079ef2140..70c1cb223ee 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c @@ -200,15 +200,9 @@ tgsi_parse_token( next_token( ctx, &inst->Dst[i].Register ); - if( inst->Dst[i].Register.Indirect ) { + if( inst->Dst[i].Register.Indirect ) next_token( ctx, &inst->Dst[i].Indirect ); - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Dst[i].Indirect.Dimension ); - assert( !inst->Dst[i].Indirect.Indirect ); - } if( inst->Dst[i].Register.Dimension ) { next_token( ctx, &inst->Dst[i].Dimension ); @@ -217,15 +211,8 @@ tgsi_parse_token( */ assert( !inst->Dst[i].Dimension.Dimension ); - if( inst->Dst[i].Dimension.Indirect ) { + if( inst->Dst[i].Dimension.Indirect ) next_token( ctx, &inst->Dst[i].DimIndirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Dst[i].Indirect.Indirect ); - assert( !inst->Dst[i].Indirect.Dimension ); - } } } @@ -235,16 +222,9 @@ tgsi_parse_token( next_token( ctx, &inst->Src[i].Register ); - if( inst->Src[i].Register.Indirect ) { + if( inst->Src[i].Register.Indirect ) next_token( ctx, &inst->Src[i].Indirect ); - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Src[i].Indirect.Indirect ); - assert( !inst->Src[i].Indirect.Dimension ); - } - if( inst->Src[i].Register.Dimension ) { next_token( ctx, &inst->Src[i].Dimension ); @@ -253,15 +233,8 @@ tgsi_parse_token( */ assert( !inst->Src[i].Dimension.Dimension ); - if( inst->Src[i].Dimension.Indirect ) { + if( inst->Src[i].Dimension.Indirect ) next_token( ctx, &inst->Src[i].DimIndirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Src[i].Indirect.Indirect ); - assert( !inst->Src[i].Indirect.Dimension ); - } } } |