|
|
|
@ -14,23 +14,23 @@
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|