summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-03 03:44:46 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-08 00:08:41 +0100
commit56e237d1f998a4090afb6763222cd65593b299d7 (patch)
treeb40d10b0b12b210e5b9ddf28324267bf210f9fd7 /src/video_core/shader
parentgl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsics (diff)
downloadyuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar.gz
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar.bz2
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar.lz
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar.xz
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.tar.zst
yuzu-56e237d1f998a4090afb6763222cd65593b299d7.zip
Diffstat (limited to 'src/video_core/shader')
-rw-r--r--src/video_core/shader/decode/warp.cpp9
-rw-r--r--src/video_core/shader/node.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/shader/decode/warp.cpp b/src/video_core/shader/decode/warp.cpp
index c2875eb2b..d98d0e1dd 100644
--- a/src/video_core/shader/decode/warp.cpp
+++ b/src/video_core/shader/decode/warp.cpp
@@ -94,6 +94,15 @@ u32 ShaderIR::DecodeWarp(NodeBlock& bb, u32 pc) {
Operation(OperationCode::ShuffleIndexed, GetRegister(instr.gpr8), src_thread_id));
break;
}
+ case OpCode::Id::FSWZADD: {
+ UNIMPLEMENTED_IF(instr.fswzadd.ndv);
+
+ Node op_a = GetRegister(instr.gpr8);
+ Node op_b = GetRegister(instr.gpr20);
+ Node mask = Immediate(static_cast<u32>(instr.fswzadd.swizzle));
+ SetRegister(bb, instr.gpr0, Operation(OperationCode::FSwizzleAdd, op_a, op_b, mask));
+ break;
+ }
default:
UNIMPLEMENTED_MSG("Unhandled warp instruction: {}", opcode->get().GetName());
break;
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h
index bd3547e0d..54217e6a4 100644
--- a/src/video_core/shader/node.h
+++ b/src/video_core/shader/node.h
@@ -47,6 +47,7 @@ enum class OperationCode {
FTrunc, /// (MetaArithmetic, float a) -> float
FCastInteger, /// (MetaArithmetic, int a) -> float
FCastUInteger, /// (MetaArithmetic, uint a) -> float
+ FSwizzleAdd, /// (float a, float b, uint mask) -> float
IAdd, /// (MetaArithmetic, int a, int b) -> int
IMul, /// (MetaArithmetic, int a, int b) -> int