diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-07 21:57:03 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-07 21:57:03 +0200 |
commit | 7b506a7c0835437ef39c08db3fc57a68c2a1cc97 (patch) | |
tree | 162585fe562b3b02f5d36332836d8921080103a9 | |
parent | 9528eae6f62700199aee9bce12a7e9ea40262018 (diff) |
driver: temp->output optimization can only be done if no swizzle
Haven't noticed any cases yet where this causes problems, but it
is a bug nevertheless if the MOV is optimized out when it does
a swizzle.
-rw-r--r-- | src/driver/etna_compiler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/driver/etna_compiler.c b/src/driver/etna_compiler.c index 8f6eba7..d27ab54 100644 --- a/src/driver/etna_compiler.c +++ b/src/driver/etna_compiler.c @@ -537,7 +537,8 @@ static void etna_compile_pass_optimize_outputs(struct etna_compile_data *cd, con if(inst->Dst[0].Register.File == TGSI_FILE_OUTPUT && inst->Src[0].Register.File == TGSI_FILE_TEMPORARY && !cd->file[TGSI_FILE_OUTPUT][out_idx].native.valid && - cd->file[TGSI_FILE_TEMPORARY][in_idx].last_use == inst_idx) + cd->file[TGSI_FILE_TEMPORARY][in_idx].last_use == inst_idx && + etna_mov_check_no_swizzle(inst->Dst[0].Register, inst->Src[0].Register)) { cd->file[TGSI_FILE_OUTPUT][out_idx].native = cd->file[TGSI_FILE_TEMPORARY][in_idx].native; /* prevent temp from being re-used for the rest of the shader */ |