From 66a7eedaa2f66e5e941cea0303c5ec348e9cc641 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 13 Sep 2009 11:59:24 -0700 Subject: tgsi: handle some src/dst aliasing in tgsi_sse2.c Src/Dst aliasing (aka SOA dependencies) requires some care to ensure intermediate results do not overwrite yet-to-be read source registers. This change ensures that MOV/SWZ handle this correctly, which is poor but no worse than the current tgsi_exec.c path. Remove the fallback as there is nothing to be gained correctness-wise between the two implementations now. Fixing this properly looks like a bit of work in this code, but might be easily achieved by sending destination writes to temporary storage. --- progs/fp/mov-alias.txt | 6 ++++++ progs/fp/mul-alias.txt | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 progs/fp/mov-alias.txt create mode 100644 progs/fp/mul-alias.txt (limited to 'progs') diff --git a/progs/fp/mov-alias.txt b/progs/fp/mov-alias.txt new file mode 100644 index 0000000000..5f04e9c76e --- /dev/null +++ b/progs/fp/mov-alias.txt @@ -0,0 +1,6 @@ +!!ARBfp1.0 +TEMP R0; +MOV R0, fragment.color; +MOV R0, R0.zyxw; +MOV result.color, R0; +END diff --git a/progs/fp/mul-alias.txt b/progs/fp/mul-alias.txt new file mode 100644 index 0000000000..cf7d359e78 --- /dev/null +++ b/progs/fp/mul-alias.txt @@ -0,0 +1,6 @@ +!!ARBfp1.0 +TEMP R0; +MOV R0, fragment.color; +MUL R0, R0.zyxw, fragment.color; +MOV result.color, R0; +END -- cgit v1.2.3