summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-06-04 00:11:16 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:34 +0200
commit562af301819227d65a251a2c29c997bf798da7ba (patch)
tree00199eb2c9c34d78430d88e40bd5b27f585daeec /src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
parentshader: Add 2D and 3D variants to SUATOM and SURED (diff)
downloadyuzu-562af301819227d65a251a2c29c997bf798da7ba.tar
yuzu-562af301819227d65a251a2c29c997bf798da7ba.tar.gz
yuzu-562af301819227d65a251a2c29c997bf798da7ba.tar.bz2
yuzu-562af301819227d65a251a2c29c997bf798da7ba.tar.lz
yuzu-562af301819227d65a251a2c29c997bf798da7ba.tar.xz
yuzu-562af301819227d65a251a2c29c997bf798da7ba.tar.zst
yuzu-562af301819227d65a251a2c29c997bf798da7ba.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/ir_opt/dual_vertex_pass.cpp24
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 b0a9f5258..a926123f2 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