summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
diff options
context:
space:
mode:
authorlat9nq <lat9nq@gmail.com>2021-07-25 21:31:33 +0200
committerGitHub <noreply@github.com>2021-07-25 21:31:33 +0200
commit09d6cc99435322c5f480eaa2b0967e33f4966ba6 (patch)
tree72cdf06f6b7d77fdf5826104fea691f3ea450f54 /src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
parentconfiguration: Use combobox apply template where possible (diff)
parentMerge pull request #6575 from FernandoS27/new_settings (diff)
downloadyuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar.gz
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar.bz2
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar.lz
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar.xz
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.tar.zst
yuzu-09d6cc99435322c5f480eaa2b0967e33f4966ba6.zip
Diffstat (limited to 'src/shader_recompiler/ir_opt/dual_vertex_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/dual_vertex_pass.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp b/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
new file mode 100644
index 000000000..055ba9c54
--- /dev/null
+++ b/src/shader_recompiler/ir_opt/dual_vertex_pass.cpp
@@ -0,0 +1,30 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "shader_recompiler/frontend/ir/ir_emitter.h"
+#include "shader_recompiler/ir_opt/passes.h"
+
+namespace Shader::Optimization {
+
+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& 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