summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-20 10:28:22 -0600
committerBrian Paul <[email protected]>2009-08-20 10:52:12 -0600
commit013bd4da1a4c112334c0b658f2506446df3666a6 (patch)
tree1a968fccdc11d1ce09993be581a6427b34a7da22 /src/gallium/auxiliary/tgsi/tgsi_exec.h
parentfffcecc4d93253b077479d5f550a8fc5c20e54cd (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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index 8a9100f4c3e..fd9ef6f35df 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -272,6 +272,14 @@ tgsi_exec_machine_run(
struct tgsi_exec_machine *mach );
+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)
{