diff options
author | Brian Paul <brianp@vmware.com> | 2009-08-20 10:28:22 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-20 10:28:22 -0600 |
commit | 4c7c294ffff2a66f4585faa41ea9810527ea1e92 (patch) | |
tree | 2c7ff318e6fcdaa79df8a1cef830e246e8913a22 /src/gallium/auxiliary/tgsi/tgsi_exec.h | |
parent | 5e6d21afa4efe033e27b980cc26266c3db6d9021 (diff) |
tgsi: handle SOA dependencies for MOV/SWZ
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled. For example:
MOV T, T.yxwz; would expand into:
MOV t0, t1;
MOV t1, t0;
MOV t2, t3;
MOV t3, t2;
The second instruction will produce the wrong result since we wrote to t0
in the first instruction. We need to use an intermediate temporary to fix
this.
This will take more work to fix for all TGSI instructions. This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.
Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index da22baad3e..182e5e228b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -272,6 +272,10 @@ void tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach); +boolean +tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst); + + static INLINE void tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask) { |