summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/decode/other.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-24 06:24:38 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 21:54:53 +0100
commite1fea1e0c594cc7c5a404e7006a4b4b2f29200ae (patch)
tree269b0a3512d9ee97bbe7ef1e0df9ec8697056939 /src/video_core/shader/decode/other.cpp
parentshader_decode: Implement VMAD and VSETP (diff)
downloadyuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.gz
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.bz2
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.lz
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.xz
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.zst
yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.zip
Diffstat (limited to 'src/video_core/shader/decode/other.cpp')
-rw-r--r--src/video_core/shader/decode/other.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp
index 9630ef831..1918762b8 100644
--- a/src/video_core/shader/decode/other.cpp
+++ b/src/video_core/shader/decode/other.cpp
@@ -12,6 +12,7 @@ namespace VideoCommon::Shader {
using Tegra::Shader::ConditionCode;
using Tegra::Shader::Instruction;
using Tegra::Shader::OpCode;
+using Tegra::Shader::Register;
u32 ShaderIR::DecodeOther(BasicBlock& bb, u32 pc) {
const Instruction instr = {program_code[pc]};
@@ -140,6 +141,30 @@ u32 ShaderIR::DecodeOther(BasicBlock& bb, u32 pc) {
SetRegister(bb, instr.gpr0, value);
break;
}
+ case OpCode::Id::OUT_R: {
+ UNIMPLEMENTED_IF_MSG(instr.gpr20.Value() != Register::ZeroIndex,
+ "Stream buffer is not supported");
+
+ if (instr.out.emit) {
+ // gpr0 is used to store the next address and gpr8 contains the address to emit.
+ // Hardware uses pointers here but we just ignore it
+ bb.push_back(Operation(OperationCode::EmitVertex));
+ SetRegister(bb, instr.gpr0, Immediate(0));
+ }
+ if (instr.out.cut) {
+ bb.push_back(Operation(OperationCode::EndPrimitive));
+ }
+ break;
+ }
+ case OpCode::Id::ISBERD: {
+ UNIMPLEMENTED_IF(instr.isberd.o != 0);
+ UNIMPLEMENTED_IF(instr.isberd.skew != 0);
+ UNIMPLEMENTED_IF(instr.isberd.shift != Tegra::Shader::IsberdShift::None);
+ UNIMPLEMENTED_IF(instr.isberd.mode != Tegra::Shader::IsberdMode::None);
+ LOG_WARNING(HW_GPU, "ISBERD instruction is incomplete");
+ SetRegister(bb, instr.gpr0, GetRegister(instr.gpr8));
+ break;
+ }
case OpCode::Id::DEPBAR: {
LOG_WARNING(HW_GPU, "DEPBAR instruction is stubbed");
break;