rsx: Decompiler fixups for conditional execution

- Cond actually obeys vector mask
This commit is contained in:
kd-11 2019-08-14 19:35:03 +03:00 committed by kd-11
parent f9aea076ae
commit fe6ff8622a
3 changed files with 16 additions and 2 deletions

View file

@ -310,7 +310,9 @@ void VertexProgramDecompiler::AddCodeCond(const std::string& dst, const std::str
}
// NOTE: dst = _select(dst, src, cond) is equivalent to dst = cond? src : dst;
const auto cond = ShaderVariable(dst).match_size(GetRawCond());
const auto dst_var = ShaderVariable(dst);
const auto raw_cond = dst_var.add_mask(GetRawCond());
const auto cond = dst_var.match_size(raw_cond);
AddCode(dst + " = _select(" + dst + ", " + src + ", " + cond + ");");
}