From 14791630f905332c5d9693828d161ddab05f8c9a Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Mon, 18 Jan 2016 23:57:56 +0100 Subject: [PATCH] enable instancing --- rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp index 3f87cfbd2f..a56b5f4212 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp @@ -173,6 +173,16 @@ namespace OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(0);\n"; return; } + if (real_input.frequency > 1) + { + if (real_input.is_modulo) + { + OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id % " << real_input.frequency << ");\n"; + return; + } + OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id / " << real_input.frequency << ");\n"; + return; + } OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id);\n"; return; }