aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/shader_jit_x64.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-08-23 17:56:35 -0400
committerbunnei <bunneidev@gmail.com>2015-08-23 17:56:35 -0400
commit83c214f6d8b1434503b6d8219bdac7064b8df2ca (patch)
tree8762cf0a0399b5fff978f098504dc9f918d2b4ee /src/video_core/shader/shader_jit_x64.cpp
parent387bd3a1e49bc5d6e631798753aa8e72a930eebe (diff)
parent03c5cfead4a6ad75097e736062b25f9a7e6082cd (diff)
Merge pull request #1062 from aroulin/shader-rcp-rsq
Shader: RCP and RSQ computes only the 1st component
Diffstat (limited to 'src/video_core/shader/shader_jit_x64.cpp')
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index 366be3901..6865c64e3 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -529,9 +529,10 @@ void JitCompiler::Compile_MOV(Instruction instr) {
void JitCompiler::Compile_RCP(Instruction instr) {
Compile_SwizzleSrc(instr, 1, instr.common.src1, SRC1);
- // TODO(bunnei): RCPPS is a pretty rough approximation, this might cause problems if Pica
+ // TODO(bunnei): RCPSS is a pretty rough approximation, this might cause problems if Pica
// performs this operation more accurately. This should be checked on hardware.
- RCPPS(SRC1, R(SRC1));
+ RCPSS(SRC1, R(SRC1));
+ SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 0, 0, 0)); // XYWZ -> XXXX
Compile_DestEnable(instr, SRC1);
}
@@ -539,9 +540,10 @@ void JitCompiler::Compile_RCP(Instruction instr) {
void JitCompiler::Compile_RSQ(Instruction instr) {
Compile_SwizzleSrc(instr, 1, instr.common.src1, SRC1);
- // TODO(bunnei): RSQRTPS is a pretty rough approximation, this might cause problems if Pica
+ // TODO(bunnei): RSQRTSS is a pretty rough approximation, this might cause problems if Pica
// performs this operation more accurately. This should be checked on hardware.
- RSQRTPS(SRC1, R(SRC1));
+ RSQRTSS(SRC1, R(SRC1));
+ SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 0, 0, 0)); // XYWZ -> XXXX
Compile_DestEnable(instr, SRC1);
}