diff options
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 8981cf300..842ec157d 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -139,18 +139,6 @@ void EmitInst(EmitContext& ctx, IR::Inst* inst) { | |||
| 139 | } | 139 | } |
| 140 | throw LogicError("Invalid opcode {}", inst->GetOpcode()); | 140 | throw LogicError("Invalid opcode {}", inst->GetOpcode()); |
| 141 | } | 141 | } |
| 142 | |||
| 143 | void Alias(IR::Inst& inst, const IR::Value& value) { | ||
| 144 | if (value.IsImmediate()) { | ||
| 145 | return; | ||
| 146 | } | ||
| 147 | IR::Inst* const value_inst{value.InstRecursive()}; | ||
| 148 | if (inst.GetOpcode() == IR::Opcode::Identity) { | ||
| 149 | value_inst->DestructiveAddUsage(inst.UseCount()); | ||
| 150 | value_inst->DestructiveRemoveUsage(); | ||
| 151 | } | ||
| 152 | inst.SetDefinition(value_inst->Definition<Id>()); | ||
| 153 | } | ||
| 154 | } // Anonymous namespace | 142 | } // Anonymous namespace |
| 155 | 143 | ||
| 156 | std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { | 144 | std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { |
| @@ -183,32 +171,4 @@ std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { | |||
| 183 | return ctx.code; | 171 | return ctx.code; |
| 184 | } | 172 | } |
| 185 | 173 | ||
| 186 | void EmitIdentity(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 187 | Alias(inst, value); | ||
| 188 | } | ||
| 189 | |||
| 190 | void EmitBitCastU16F16(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 191 | Alias(inst, value); | ||
| 192 | } | ||
| 193 | |||
| 194 | void EmitBitCastU32F32(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 195 | Alias(inst, value); | ||
| 196 | } | ||
| 197 | |||
| 198 | void EmitBitCastU64F64(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 199 | Alias(inst, value); | ||
| 200 | } | ||
| 201 | |||
| 202 | void EmitBitCastF16U16(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 203 | Alias(inst, value); | ||
| 204 | } | ||
| 205 | |||
| 206 | void EmitBitCastF32U32(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 207 | Alias(inst, value); | ||
| 208 | } | ||
| 209 | |||
| 210 | void EmitBitCastF64U64(EmitContext&, IR::Inst& inst, const IR::Value& value) { | ||
| 211 | Alias(inst, value); | ||
| 212 | } | ||
| 213 | |||
| 214 | } // namespace Shader::Backend::GLASM | 174 | } // namespace Shader::Backend::GLASM |