summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraroulin <andy.roulin@epfl.ch>2015-08-21 10:51:41 +0200
committeraroulin <andy.roulin@epfl.ch>2015-08-22 11:09:53 +0200
commit2e7cf2f6cf5fd1caf574b9799553f67710395047 (patch)
tree34d47406941eef58593e3227f7c0555002853188
parentMerge pull request #1056 from lioncash/emitter (diff)
downloadyuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar.gz
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar.bz2
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar.lz
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar.xz
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.tar.zst
yuzu-2e7cf2f6cf5fd1caf574b9799553f67710395047.zip
-rw-r--r--src/video_core/shader/shader_interpreter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp
index 063cc38f0..6b83d2c1c 100644
--- a/src/video_core/shader/shader_interpreter.cpp
+++ b/src/video_core/shader/shader_interpreter.cpp
@@ -197,12 +197,19 @@ void RunInterpreter(UnitState<Debug>& state) {
case OpCode::Id::DP3:
case OpCode::Id::DP4:
+ case OpCode::Id::DPH:
+ case OpCode::Id::DPHI:
{
Record<DebugDataRecord::SRC1>(state.debug, iteration, src1);
Record<DebugDataRecord::SRC2>(state.debug, iteration, src2);
Record<DebugDataRecord::DEST_IN>(state.debug, iteration, dest);
+
+ OpCode::Id opcode = instr.opcode.Value().EffectiveOpCode();
+ if (opcode == OpCode::Id::DPH || opcode == OpCode::Id::DPHI)
+ src1[3] = float24::FromFloat32(1.0f);
+
float24 dot = float24::FromFloat32(0.f);
- int num_components = (instr.opcode.Value() == OpCode::Id::DP3) ? 3 : 4;
+ int num_components = (opcode == OpCode::Id::DP3) ? 3 : 4;
for (int i = 0; i < num_components; ++i)
dot = dot + src1[i] * src2[i];