dual_vertex_pass.cpp 864 B

1234567891011121314151617181920212223242526272829
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "shader_recompiler/frontend/ir/ir_emitter.h"
  4. #include "shader_recompiler/ir_opt/passes.h"
  5. namespace Shader::Optimization {
  6. void VertexATransformPass(IR::Program& program) {
  7. for (IR::Block* const block : program.blocks) {
  8. for (IR::Inst& inst : block->Instructions()) {
  9. if (inst.GetOpcode() == IR::Opcode::Epilogue) {
  10. return inst.Invalidate();
  11. }
  12. }
  13. }
  14. }
  15. void VertexBTransformPass(IR::Program& program) {
  16. for (IR::Block* const block : program.blocks) {
  17. for (IR::Inst& inst : block->Instructions()) {
  18. if (inst.GetOpcode() == IR::Opcode::Prologue) {
  19. return inst.Invalidate();
  20. }
  21. }
  22. }
  23. }
  24. } // namespace Shader::Optimization