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/drivers/nv50/codegen | |
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/drivers/nv50/codegen')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp index a3830ed3c2a..613187c0a12 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp @@ -23,6 +23,7 @@ extern "C" { #include "tgsi/tgsi_dump.h" #include "tgsi/tgsi_scan.h" +#include "tgsi/tgsi_util.h" } #include <set> @@ -55,6 +56,11 @@ public: SrcRegister(const struct tgsi_src_register& src) : reg(src), fsr(NULL) { } + SrcRegister(const struct tgsi_ind_register& ind) + : reg(tgsi_util_get_src_from_ind(&ind)), + fsr(NULL) + { } + struct tgsi_src_register offsetToSrc(struct tgsi_texture_offset off) { struct tgsi_src_register reg; |