diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2021-06-04 00:11:16 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:34 -0400 |
commit | 562af301819227d65a251a2c29c997bf798da7ba (patch) | |
tree | 00199eb2c9c34d78430d88e40bd5b27f585daeec /src/shader_recompiler/ir_opt/dual_vertex_pass.cpp | |
parent | ec9a78885e6a07b5259c9fbec19d9756443651b1 (diff) |
shader: Fix VertexA Shaders.
Diffstat (limited to 'src/shader_recompiler/ir_opt/dual_vertex_pass.cpp')
-rw-r--r-- | src/shader_recompiler/ir_opt/dual_vertex_pass.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp b/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp index b0a9f5258e..a926123f2d 100644 --- a/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp +++ b/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp @@ -13,16 +13,24 @@ namespace Shader::Optimization { -void VertexATransformPass(IR::Program&) { - throw NotImplementedException("VertexA pass"); +void VertexATransformPass(IR::Program& program) { + for (IR::Block* const block : program.blocks) { + for (IR::Inst& inst : block->Instructions()) { + if (inst.GetOpcode() == IR::Opcode::Epilogue) { + return inst.Invalidate(); + } + } + } } -void VertexBTransformPass(IR::Program&) { - throw NotImplementedException("VertexA pass"); -} - -void DualVertexJoinPass(IR::Program&) { - throw NotImplementedException("VertexA pass"); +void VertexBTransformPass(IR::Program& program) { + for (IR::Block* const block : program.blocks) { + for (IR::Inst& inst : block->Instructions()) { + if (inst.GetOpcode() == IR::Opcode::Prologue) { + return inst.Invalidate(); + } + } + } } } // namespace Shader::Optimization |