rsx: Disable SCA writes to output register if vec result flag is set.

- Noticed when debugging X-men origins: wolverine which has a bogus SCA op whilst writing vector to output
- It makes no sense for both SCA and VEC to both write to the same register in the same instruction as memory ordering becomes an issue
This commit is contained in:
kd-11 2020-05-08 09:08:00 +03:00 committed by kd-11
parent 79c54aeba9
commit 14969cd8d0
2 changed files with 7 additions and 6 deletions

View file

@ -45,7 +45,7 @@ std::string VertexProgramDecompiler::GetDST(bool is_sca)
// ARL writes to special integer registers
const bool is_address_reg = !is_sca && (d1.vec_opcode == RSX_VEC_OPCODE_ARL);
const auto tmp_index = is_sca ? d3.sca_dst_tmp : d0.dst_tmp;
const bool is_result = is_sca ? (tmp_index == 0x3f) : d0.vec_result;
const bool is_result = is_sca ? !d0.vec_result : d0.vec_result;
if (is_result)
{